Forum Moderators: phranque

Message Too Old, No Replies

301 redirecting old site to new site

Rredirecting old site to new site, keeping all pages relative

         

bouncybunny

1:44 pm on Apr 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I'm sure I've seen this somewhere here, but I can't find it. I've tried finding an easy way to do this in the Apache manuals and my brain is really hurting. I am an appalling coder.

I've managed to do this;

RedirectMatch Permanent ^/(.*)$ http:// www. newdomain.com/

But it simply redirects to the home page.

I want to 301 redirect an old domain to a new one, including redirecting the relative pages, that will be staying in the same place.

For example

http:// www. oldomain.com/thisdirectory/thispage.html

should go to

http:// www. newdomain.com/thisdirectory/thispage.html

(urls intentionally broken for forum TOS)

Many thanks for any help.

For those interested in the details, I am actually unparking a domain from the 'real' domain - which Yahoo insists on indexing sometimes - and putting in the redirects to the 'real' domain, to prevent any potential duplication issues. My guess is that some whois service probably links to the parked domain and bots are coming in that way.

bouncybunny

1:59 pm on Apr 15, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member


Ak, I'm an idiot.

All it took was this

Redirect 301 / http://www.newdomain.com/

OK, close the thread, move along, nothing to see here. ;)