Scratching my head on this. I have an old URL:
http://myserver/blog/archive?openview&type=Category&key=Demo
and a new URL
http://myserver/blog/categories/Demo
I'm trying to get a rewrite rule for this. I thought it would be:
^/blog/archive\?openview&type=Category&key=(.*) /blog/categories/$1.html [NC,R=301,L]
But that doesn't do anything. I tried the URL and rule (replace the ? with /):
http://myserver/blog/archive/openview&type=Category&key=Demo
^/blog/archive/openview&type=Category&key=(.*) /blog/categories/$1.html [NC,R=301,L]
And that works as expected. So I'm a bit dumbfolded how to handle the ? for matching in the old URL. All the samples I found describe the opposite case. Sending the "pretty" URL to the ugly one. In my case the "ugly" URL is what people in the past had bookmarked and I want to make sure they get to the new data properly