Hi, I've spent most of the day trawling the internet trying variants of 301 redirects to get this to work.
I'm not sure really where I'm going wrong -
Basically, changed shop over to a new system and need to individually forward each old page to the new one on new site.
There is no structure behind it, so I will do each individually.
Example: http://www.example.co.uk/cgi-bin/product.pl?id=fittedcot
needs to redirect to
http://www.example.co.uk/eczema/dermatherapy
How can I do this? I've got quite close, when I was able to redirect to
http://www.example.co.uk/eczema/dermatherapy?id=fittedcot which is close apart from appending the query string, but even attaching the "?" to end of the url to remove the string (so I read), it wasn't disappearing, and now I've fiddled so much, I can't get it working at all.
Please could someone let me know a line of code that will work for this? I've tried the basic ones:
Redirect 301 /cgi-bin/product.pl?id=fittedcot http://www.example.co.uk/eczema/dermatherapy?
and
RewriteCond %{QUERY_STRING} ^id=fittedcot$
RewriteRule ^product\.pl$ http://www.example.co.uk/eczema/dermatherapy? [R=301,L]
^^^ I thought this would work. But it's not picking it up/doing nothing. I have other 301's working, and have rewriteengine on etc...I'm starting to lose my mind with it...seems simple compared to all the complex dynamic ones I've been reading today! Just can't crack it. I'm sure i'm going wrong with the query string
[edited by: phranque at 11:42 pm (utc) on Jul 14, 2013]
[edit reason] exemplified domain [/edit]