Arithan
12-29-2009, 01:29 AM
I currently have a forum on my site in its own directory: www.example.com/forums
I also have a subdomain that has that directory as its root: forums.example.com
I currently have this to get rid of the www like if someone types www.forums.example.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.forums\.example\.com$ [nc]
RewriteRule ^(.*)$ http://forums\.example.com/$1 [R=301,L]
But when I go to www.example.com/forums I can still access the forums. What do I have to do to make it so that when people go to www.example.com/forums it will redirect them to http://forums.example.com ?
I also have a subdomain that has that directory as its root: forums.example.com
I currently have this to get rid of the www like if someone types www.forums.example.com
RewriteEngine on
RewriteCond %{HTTP_HOST} ^www\.forums\.example\.com$ [nc]
RewriteRule ^(.*)$ http://forums\.example.com/$1 [R=301,L]
But when I go to www.example.com/forums I can still access the forums. What do I have to do to make it so that when people go to www.example.com/forums it will redirect them to http://forums.example.com ?