-2

I had a user http://www.example.com/forums for many years and very well index in the search engine. I have moved this to subdomain http://community.example.com and created another website example.com. Now how can I created permanent redirect for all the old indexing that I have in the search engine to go to the new address.

I found about 301 redirect in .htaccess but not sure how to do it.

Can you please advise?

I am on Linux with apache.

2 Answers2

0

Add the following to the .htaccess. Htaccess redirect is better(faster) than the meta refresh or PHP redirect.

To redirect all pages, add the following to the .htaccess in the forums directory of http://www.example.com/

Redirect 301 / http://community.example.com/
0

If you're keeping the same file structure as your old site, I believe you can just do

Redirect 301 /forums http://community.example.com/