I recently changed my CMS, and want to rewrite some of my URLs to match the new URL/query string parameter format.
The old URL was:
http://www.mysite.com/search.cgi?tag=foo&blog_id=bar&other=baz
The new URL should be:
http://www.mysite.com/?s=foo
In other words, there were several query string parameters in the old format, but I only care to rewrite the tag param to s while keeping the same value. The other parameters should be discarded. Of course the order of the parameters shouldn't matter. It also shouldn't matter whether tag is the only parameter or not.
Any ideas?