Forum Moderators: phranque

Message Too Old, No Replies

How to 301 Redirect /oldforum to /newforum on new domain

         

NyahK

7:57 am on Dec 12, 2013 (gmt 0)

10+ Year Member



Hello,

I am trying to accomplish two things:

1. Redirect http://www.example.com/oldforum to http: // www. newsite .com /newforum

2. All other requests not related to the /oldforum should redirect the new site's root (http://www.newsite.com/)

Can somebody please help me out? I'm really confused.

Thank you!

lucy24

9:27 am on Dec 12, 2013 (gmt 0)

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



Well, what have you tried so far?

Psst! If you need to name more than one site, you can say example.org, example.no, example.se and so on.

All other requests not related to the /oldforum should redirect the new site's root

Are you absolutely positive that this is the approach you want to take? How many URLs are we talking about? If you're simply shutting down the old site, wouldn't a special "It ain't here no more" page be more appropriate?

g1smd

1:15 am on Dec 17, 2013 (gmt 0)

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



RewriteRule ^oldforum(/(.*))?$ http://www.example.com/newforum/$2 [R=301,L]

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


Pattern
^oldforum(/(.*))?$
can be
^oldforum(/.*)?$
if you adjust target
/$2
to
$1
.