Forum Moderators: phranque

Message Too Old, No Replies

Redirect everything to root

         

rlopes

6:14 pm on Feb 27, 2010 (gmt 0)

10+ Year Member Top Contributors Of The Month



Hello, I am trying to 301 redirect everything from site A to root at site B.

I tried

redirect 301 / http://www.site-b.com/


But if you go to www.site-a.com/subdirectory, it will redirect to www.site-b.com/subdirectory, and I need all to root.

Thanks.

[edited by: jdMorgan at 4:47 pm (utc) on Mar 1, 2010]
[edit reason] de-linked to fix formatting proble and comply with TOS & Charter [/edit]

rlopes

6:17 pm on Feb 27, 2010 (gmt 0)

10+ Year Member Top Contributors Of The Month



The code I tried above ended up changed by the forum script. Here it goes again:

redirect 301 / www.site-b.com

g1smd

7:10 pm on Feb 27, 2010 (gmt 0)

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



Paths are reappended when using Redirect. Try using RewriteRule:

RewriteRule .* http://www.example.com/ [R=301,L]


It is usually very bad form to redirect all pages of one domain to the root of another domain.

jdMorgan

4:48 pm on Mar 1, 2010 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



"Bad form" in this case meaning, "Search engines hate this" and visitors may get really annoyed (which is why SEs don't like it.)

Jim