[thelist] mod rewriting question

Tom Dell'Aringa pixelmech at gmail.com
Tue May 15 07:56:48 CDT 2007

Hey folks,

I'm thinking this should be way easier than it seems, but I am totally
striking out. For my new drupal site, I have a bunch of urls from the old
site that have changed on the new site. The new site uses rewrite to write
"clean" urls as well. I've been all over the drupal site, but honestly the
info there has done nothing but confuse the issue. What I want to do is
seemingly pretty simple. I have a list of all the urls I want to 301
redirect to the corresponding new clean urls. For example:

The old URL

Needs to be 301 redirected to:

(not sure if the trailing slashies should be there or not)

What is the simplest most direct way to mod rewrite these urls (I have like
40 of them)?

My current .htaccess has some drupal rewrites, and I have gathered that any
rewrites I add must go above those, so this is what is currently there:

# Various rewrite rules.
<IfModule mod_rewrite.c>
  RewriteEngine on

 # ***** I'm told my rewrite rules should go here *****

  # Rewrite current-style URLs of the form 'index.php?q=x'.
  RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]

Any help is greatly appreciated! (please CC me at pixelmech at gee mail dot

Listen. Strange women lying in ponds distributing swords is no basis for a
system of government. Supreme executive power derives from a mandate from
the masses, not from some farcical aquatic ceremony. - Dennis

More information about the thelist mailing list