I have a forum in which it is mostly used as www.domain.com/forum but I set up a subdomain for it last year so some pages got indexed by google as forum.domain.com. Instead of just removing the subdomain and having the indexed pages go to a 404, I would like htaccess to redirect to proper thread. Current URL: forum.domain.com/index.php/topic,1234.0.html Needs to be: www.domain.com/forum/index.php/topic,1234.0.html Thanks
Not tested but it should work like this: RewriteCond %{HTTP_HOST} ^forum\.domain\.com$ [NC] RewriteRule ^(.*)$ http://www.domain.com/forum/$1 [R=301,L] Code (markup):