Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I had a user for many years and very well index in the search engine. I have moved this to subdomain and created another website 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.

share|improve this question

migrated from Jul 16 '12 at 2:01

This question came from our site for professional and enthusiast programmers.

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

Redirect 301 /
share|improve this answer

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

Redirect 301 /forums
share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.