Hello,

I need to 301 redirect one Drupal page on website A to one Drupal page on website B. Here is the redirect I am using:

Redirect 301 /review-example http://www.websiteb.com/review-example

Notice the same name.

The redirect does redirect, but it ends up at this page, which doesn't exist:

http://www.websiteb.com/review-example/?q=review-example

Ugh. I did search the forums, but all the 301 redirect examples, but they are for handling redirects on the *same* site. I tried many snippets of code, but it seems when the redirect goes from the main site /q is appended.

Any help?

Comments

pgrote’s picture

Ok, so no answers on this one. :)

How about this ... is there a way to do it without involving Drupal at all?

mooffie’s picture

It seems that mod_alias (which provides Redirect) clashes with mod_rewrite. Why don't you use mod_rewrite for the redirection? Do:

RewriteRule ^(review-example.*)$ http://www.websiteb.com/$1 [L,R=301]

(Put this before any other RewriteRules.)

pgrote’s picture

You sir saved my bacon.

I am moving over 50 articles from one site to another and they rank well in Google.

Here is what I went with that works:

RewriteRule ^(review-example)$ http://www.newebsite.com/$1 [L,R=301]

The .* wasn't working for me, so I removed it from the regex.

THANK YOU AGAIN!