We are moving from one site language/CMS (coldfusion/custom) to another (PHP/Drupal) and need to have some of our old pages redirected to new ones. I have access to both the .htaccess and httpd.conf (and apache2.conf) as this is a vps on Linode.
Most of them cannot be done via regular expression (they contain GUIDs in the URL) and we're ok writing static redirects.
Here's an example:
RewriteRule /show.cfm/FG3f4-30F1G/ http://www.mysite.com/john-smith [R=301]
that's it...I've tried the syntax with the starting caret ^, ending dollar sign, none of it seems to work.
I may have a misunderstanding as to what role the RewriteCond plays -- there are other lines already in the .htaccess.
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_URI} !=/favicon.ico
RewriteRule ^(.*)$ index.php?q=$1 [L,QSA]
Do I need to re-declare the RewriteCond once the RewriteRule is specified?
Also -- Ideally, to preserve cleanliness in the .htaccess, I would like to use a RewriteMap, where I can specify one text file and just have two tab-delimited columns of "old url | new url"...but I can't get that to work either (if it's even appropriate to use).
Any ideas would be MOST welcome...