I recently migrated from pmwiki to drupal and would like to preserve my old links for seo purposes.

http://www.mysite.com/old/url to http://www.mysite.com/new-url

First I tried this 301 redirect in my .htaccess:

redirect 301 /old/url http://www.mysite.com/new-url

I get this:

http://www.mysite.com/new-url?q=old/url

Then I removed that line and tried adding this one directly below RewriteEngine on

RewriteRule ^old/url$ http://www.mysite.com/new-url [R=301,L]

I've search the drupal forum archives and attempted several other .htaccess rewrites but end up either with server errors or the same ?q=old/url tagged to the end.

Comments

reecemarsland’s picture

You could try the path redirect module. I'm pretty sure that will handle this for you really well.

Hope this helps.

B.P.B’s picture

Path redirect works beautifully. Thank you for the tip!