I am converting a site to Drupal.

I want to redirect the old URLs to the new ones, for example:

/index.php?p=abcd-efgh

to

/abcd-efgh

I tried this in the .htacess but it didn't work:

Redirect 301 /index.php?p=abcd-efgh http:/ /www. my_site .com/abcd-efgh

(spaces added in the above example to prevent linking)

Same domain for both old and new URLs.

Comments

wdrupal’s picture

After a long search I found this solution which worked:

RewriteCond %{QUERY_STRING} pid=200
RewriteRule ^fishing/index\.php$ /fishing? [R=301,L]

http://drupal.org/node/16084