Forum Moderators: phranque

Message Too Old, No Replies

Redirect only homepage of one domain to new domain

         

kheruc

1:04 pm on Aug 20, 2007 (gmt 0)

10+ Year Member



I'm having trouble with redirecting homepage to new domain.

I just want that http://www.example.com/ redirects to http://www.example2.com/

I tried with:
Redirect 301 / http://www.example2.com/

but it redirects all subpages (i.e. http://www.example.com/page1.html -> http://www.example2.com/page1.html) to new domain and I don't want that.

Please help

[edited by: jdMorgan at 2:06 pm (utc) on Aug. 20, 2007]
[edit reason] example.com, de-linked [/edit]

jdMorgan

2:04 pm on Aug 20, 2007 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Of course it does... Since that's what the Apache mod_alias Redirect directive documentation [httpd.apache.org] says it will do... :)

Try RedirectMatch [httpd.apache.org] instead:


RedirectMatch 301 ^/$ http://www.example2.com/

Jim

kheruc

2:34 pm on Aug 20, 2007 (gmt 0)

10+ Year Member



Thank You Jim.