MyBB Community Forums

Full Version: .htaccess 301 redirect subdomain links to topdomain
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
Hi guys!

I dont know if this is the right section for my query,Also i dont know how to title up my thread.

but anyway here's my problem:

i have a community site which the url is www.forums.mydomain.com, i used GoogleSEO plugin for the links.

Then recently I moved my site to a new Webhost and revamp the site again which makes my Community site reside in "mydomain.com".

My question is, is it possible to redirect those www.forums.mydomain.com/**googleSEO generated links** to my newly moved site www.mydomain.com/**googleSEO generated links**

I have no idea on how to start this and i havent much more knowledge about mod_rewrite in .htaccess.
Any one who can give links or help me with this problem.You're so much of a big help

BTW sorry for my bad english Big Grin


Thank you very much.
Paste to your .htaccess file this code:
RewriteEngine On
RewriteCond %{HTTP_HOST} ^www.forums.mydomain.com
RewriteRule ^(.*)$ http://www.mydomain.com/$1 [R=301,L]
Ill try this later bro.

thank you!!

Edit: i tried it but No Luck.
working fine..