QUERY_STRING & mod_rewrite
A few months ago, I needed to make some mod_rewrite rules that did things to the QUERY_STRING. After a lot of searching and unsuccessful attempts, I found this document (local mirror). Some experimenting later, I had it all working nicely.
For example, I’ve got something like:
RewriteCond %{QUERY_STRING} ^page=([0-9]{1,})$ RewriteRule ^/testsite/$ /testsite/page.cgi?seek=%1 [PT,L]