Forum Moderators: phranque
I know this has been covered a billion times and after many, many hours and a friend helping, I'm hoping someone here can help me!
I have an archaic CMS on a shared server with these urls:
http://www.old-example.com/categoryname?cid=1259&pid=337
And I am trying to do 301 redirects on all of these to a new Drupal site (and domain name), on a new server that has:
http://www.new-example.com/category/pagename
The rule that makes the most sense to me was:
RewriteEngine On
RewriteCond %{QUERY_STRING} ^categoryname?cid=1259&pid=337$
RewriteRule ^melbourne$ http://www.new-example.com/category/pagename? [R=301,L]
But alas, it is not to be. I can redirect the entire site successfully so I know the .htaccess is working but I am really struggling here.
Any help would be much appreicated.
Cheers,
Nicole
[edited by: jdMorgan at 2:11 am (utc) on Jan. 21, 2010]
[edit reason] example.com [/edit]
RewriteEngine On
#
RewriteCond %{QUERY_STRING} ^cid=1259&pid=337$
RewriteRule ^categoryname$ http://www.new-example.com/category/pagename? [R=301,L]
If you use this latter approach, make sure to include the server 301 status header and thoroughly test this code with a server headers checker such as the "Live HTTP Headers" add-on for Firefox/Mozilla browsers.
Jim