Hi, Currently our forum is hosted like this http://www.domain.com/forum. We are moving our forum too: http://forum.domain.com/. We have over 650k pages indexed in google. Is there anyway we can place a .htaccess redirect in the /forum/ root so ANY traffic hitting /forum/ will go to the new sub-domain? We have root access on a windows server 2003 box. Thanks
i am not expert in it .. but i think 301 redirect would serve your purpose. but importantly why you have done it ?
Hi, Yes i appreciate a 301 is the correct way but I was wondering HOW to do it with .htaccess. I want the WHOLE of sub-dir to be 301'ed to the sub-domain as there are many threads\links etc. So anything going too: http://www.domain.com/forum/showthread.php?t=4495 Will now go too: http://forum.domain.com/forum/showthread.php?t=4495 Is this possible? Why have are we going to do it? Basically we want the forum on a sub-domain...
How about this. Put in home directory .htaccess RewriteEngine on RewriteCond %{HTTP_HOST} ^(www\.)?domain\.com RewriteRule ^forum/?(.*) http://forum.domain.com/$1 [R=301,L] S
Thanks for the replies guys... What is the best solution? ...or is it 6 of one half a dozen of the other?
so literally do I just create a file called ".htaccess" and put the following code in there (in the /forum/ folder)? RedirectMatch 301 /forum/(.*) http://forum.domain.com/forum/$1 PHP: