Forum Moderators: phranque

Message Too Old, No Replies

I need to redirect any request from one site

to the new one ... with .htaccess

         

le_gber

8:15 pm on Feb 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Hi All,

just a quick one that is doing my head in:

I need to redirect all request from an old site to a single page on the new one

I tried:

RedirectPermanent / [mynewsite.tld...]

but it doesn't catch everything (the requests going to an old directory give 404)

I don't know if you can put a wildcart to redirect any request from old to one single page on new (the homepage for example)

thanks for your help

Leo

jdMorgan

9:14 pm on Feb 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Use RedirectMatch to catch all requests:

RedirectMatch 301 ^/ http://www.example.com/single_page.html

Jim
[edit] Corrected spelling as noted in following posts. [/edit]

[edited by: jdMorgan at 2:24 am (utc) on Feb. 19, 2005]

le_gber

10:32 pm on Feb 18, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Cheers Jim it works perfectly(after I got rid of the w in RewdirectMatch ;) )

thanks again

Leo

jdMorgan

2:22 am on Feb 19, 2005 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



...no warranty. expressed or implied, as to the quality of my typing... ;)

(I'll fix it so that others won't copy it, though).

Jim