Drupal - Redirects for Clean URLs

You've decided to convert an old site to Drupal and now you are wondering how can you use all of the powers of Drupal without ruining the SEO that you have already established. The simple answer to that is by adding permanent redirects into your htaccess file. If you have clean URLs turned on for your instance of Drupal, the way you have to add permanent redirects is by using REWRITE statements. You are going to want to add any of these statements prior to any of the other REWRITE statements you have setup in your htaccess file.

First, make sure that the base url is defined:

RewriteBase /

The base of my site is "/", so you will need to change the "/" to the base of your site. This would be defined in your settings.php file.

Last, add the rewrite statements for the URLs that need redirected. For example, lets say we had the page tutorials/drupal.htm and wanted it to be redirected to the Drupal clean URL of tutorials/drupal-redirect. The REWRITE rule this would be

RewriteRule ^tutorials/drupal.htm$
http://www.yourdomain.com/tutorials/drupal-redirect [R=301,L]

The REWRITE rule is all one line, please excuse the line break due to the width of the page. n