.htaccess redirect to sub-domains
Posted: Thu Mar 19, 2009 11:11 am
We have several folders in a web site like:
Currently these directories physically exist and simply have an .htaccess file in each one that does something like:
Is there any way to merge all of these directories .htaccess files into the single root .htaccess file?
Code: Select all
domain.com/members
domain.com/register
domain.com/loginCode: Select all
RewriteEngine On
RewriteCond %{HTTP_HOST} !^members\.domain\.com$ [NC]
RewriteCond %{HTTP_HOST} !^$
RewriteCond %{REQUEST_URI} ^/member($|/.*$)
RewriteRule ^.* http://members.domain.com%1 [R=permanent,L]