Drupal 301 Redirects
Posted in Drupal on February 10th, 2010 by Mike – Be the first to commentBecause of Drupal’s URL query structure, standard 301 redirects in your .htaccess file will not work. Here is a simple solution for this problem.
The following should be placed on the next line after “# RewriteBase /” and before
“# Rewrite URLs of the form ‘x’ to the form ‘index.php?q=x’.”
RewriteRule ^old/file.htm$ http://www.yoursite.com/new/file.htm [R=301,L]
For URLs with spaces in them, simply wrap the URL in quote tags, like so:
RewriteRule ^old/file.htm$ “http://www.yoursite.com/new file.htm” [R=301,L]
You must use the full URL for your site for these redirects, not just the relative path.