Welcome Guest, Not a member yet? Register   Sign In
Help with CI app-path, subdomains and .htaccess
#1

[eluser]moodh[/eluser]
TL;DR: *.url.com => url.com/dev/$1 while using/not destroying the subsequent rewriterules ;p

Hi, I'm using the following .htaccess at the moment:

Code:
<IfModule mod_rewrite.c>
    Options +FollowSymLinks
    Options -Indexes
    DirectoryIndex index.php
    RewriteEngine on
    RewriteCond $1 !^(index\.php|resources|images|css|js|robots\.txt|favicon\.ico)
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule ^(.*)$ index.php?/$1 [L,QSA]
</IfModule>

And I'm trying to add a dynamic subdomain:
I want everything that comes from *.url.com to end up at url.com/index.php?dev/$1 (/dev/$1 pretty much) but I can't get it to work, mainly due to poor mod_rewrite experience. So I thought I'd ask here.
The above htaccess is the one without any changes, as they didn't get very far =P

The endgame is to alter the $application_folder variable depending on what the wildcards value is. At the moment I'm snapping up dev/wildcard and split it there, any other suggestions? Help would be appricated!
#2

[eluser]TheFuzzy0ne[/eluser]
I don't see the problem, as long as the subdomain is set up, and the DNS is set to aim requests at your Web root, it shouldn't matter what subdomain is used.
#3

[eluser]moodh[/eluser]
Ya, ignore my thread, has some rough fights with the webhost just now and managed to solve everything without touching the htaccess =)
Close/lock or whatever ;p thanks!




Theme © iAndrew 2016 - Forum software by © MyBB