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!


Messages In This Thread
Help with CI app-path, subdomains and .htaccess - by El Forum - 03-05-2009, 12:08 PM
Help with CI app-path, subdomains and .htaccess - by El Forum - 03-05-2009, 01:48 PM
Help with CI app-path, subdomains and .htaccess - by El Forum - 03-05-2009, 02:04 PM



Theme © iAndrew 2016 - Forum software by © MyBB