I am migrating from olddjango.com to newdrupal.com, and need a way to alter the URLs from the old style into the a format we've chosen for the new Drupal application.
In addition to rewriting them, I want the final "corrective" rule to redirect, to register the 301. The structure of the URL has a marker that I'm using as a RewriteCond, it is the last thing I change before the redirect (so the URI won't get rewritten unless it is from the old site).
I've written a small number of mod rewrite rules, which work well enough in http://htaccess.madewithlove.be/
If I put them in my /etc/httpd/conf/httpd.conf they work smashingly... but that isn't a viable option. (it theoretically COULD be... but only as a last resort)
However, when I put them in /.htaccess, they do absolutely nothing...
I put them at the top of the file, before anything else, I put them at the bottom... and in the middle. I tried with and without "RewriteBase /"...
I'm obviously missing something, or the nature of D7 disallows pre-empting the machinations of Clean URL. I've found at least one person saying it was possible, but no one saying there were any special tricks involved, or actual documentation... so I'm just trying to get an answer committed to the interwebs one way or the other.
This is the final rule of my section of rewrites:
RewriteCond %{REQUEST_URI} ^/?gbnk/?.* [NC]
RewriteRule ^/?gbnk/?(.*) $1 [NC,R=301,L]