• 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Rewrite a subdomain

#2
[eluser]Flak[/eluser]
This is a piece of code that I am rolling:

____
Code:
<IfModule mod_rewrite.c>

# handle domain root and skip subfolders
RewriteCond %{HTTP_HOST} ci.domain.com
RewriteCond %{REQUEST_URI} !^/ci
RewriteCond %{REQUEST_URI} \..+$
RewriteRule ^(.*)$ ci/$1 [L]

# handle files in subfolders
RewriteCond %{HTTP_HOST} ci.domain.com
RewriteCond %{REQUEST_URI} !^/ci
RewriteRule ^(.*)$ ci/$1/ [L]
</IfModule>
____


Messages In This Thread
Rewrite a subdomain - by El Forum - 07-04-2009, 02:58 PM
Rewrite a subdomain - by El Forum - 07-04-2009, 03:56 PM

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  


  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.