Forum Moderators: phranque

Message Too Old, No Replies

301 redirecting question

         

sodani

3:30 pm on Mar 30, 2008 (gmt 0)

10+ Year Member



Hi, I'd like to do a catch all 301 redirect, but I want to redirect everything to the same URL. So I want http://www.old.com and http://www.foo.com/* to redirect to http://www.new.com. Can someone tell me how to do this in an .htaccess file?

[edited by: jdMorgan at 3:59 pm (utc) on Mar. 30, 2008]
[edit reason] Removed URL and de-linked. [/edit]

g1smd

6:38 pm on Mar 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Do you need to retain the folder and file path in the redirect, or do they all redirect to the root of the other domain?

sodani

6:58 pm on Mar 30, 2008 (gmt 0)

10+ Year Member



No, I want them to all redirect to the root of the other domain.

g1smd

7:02 pm on Mar 30, 2008 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Redirecting of domains gets covered almost every day here.

You'll be able to easily modify that code, and probably just drop the $1 from the target URL.