mandes — 2010-02-06T11:06:21-05:00 — #1
Ive hit a problem here and cant seem to find a way out :rolleyes:
I have a site that started life as a subdirectory of a domain.
This little site has grown quite large and has a good SEO and link basis built up over the last couple of years, I decided to split it into a domain in its own right on a seperate server.
So I want to 301 redirect all traffic that went to the original location to the new location, I have over 500 pages on the site so a htaccess file for file would be tedious, but when I try a rewrite, I keep getting the 'mysite' subdirectory appended to the mysite address. Like www.mysite.com/mysite/file.php
Can anyone help please
dklynn — 2010-02-06T16:15:18-05:00 — #2
Apache's mod_alias (the Redirect family of directives is part of the Apache core) is the ideal tool for you! Simply put this in the .htaccess of the OLD website:
Redirect 301 /mysite http://www.mysite.com
With the 301 status, it will update the SE's and you'll not lose your rankings.
mandes — 2010-02-06T17:28:01-05:00 — #3
Thank you very much, I can believe I didnt get to that simple result after all the possibilities I tried.
It works wonderfully, thanks again
dklynn — 2010-02-06T17:53:30-05:00 — #4
Yes, Apache is WONDERFUL (and quite powerful)!