PDA

View Full Version : Apache mod rewrite implementation question


Jarrod
05-13-2006, 04:46 AM
As a part of Apache mod rewrite implementation I am facing an interesting issue.

Currently mysite.com has different live sites having different domains e.g. www.mysite.com, www1.mysite.com, www6.mysite.com etc.

After the website is re-launched on a new platform, there will only a single domain www.mysite.com.

Search Engines e.g. google, yahoo etc. will have old mysite urls till they crawl the new site again.

So now when somebody clicks on www6.mysite.com, he should be redirected to www.mysite.com.

I am looking for any Apache redirect rule, which can take care of this scenario.

Any pointers will be of great help.

reviewprice
05-14-2006, 01:23 AM
I think what you want to do is a 301 permament redirect in your .htaccess file.