Is there some way to make a RewriteRule concat together two
back-references?  What I want to do is take the REQUEST_URI and the
QUERY_STRING of a request and use the two together as a key into a
map.

So if I have a request like this:

http://mysite.com/bar/startpage?arg1=a&arg2=b

 and I want to rewrite that to

http://mysite.com/foo/endpage?arg3=c&arg4=d

Given an entry in the map file like

bar/startpage?arg1=a&arg2=b    foo/endpage?arg3=c&arg4=d


I was trying some combination like

RewriteMap map2 txt:/redirects-map.txt

RewriteCond %{REQUEST_URI} ^/bar/startpage
RewriteCond %{QUERY_STRING} arg1=a&arg2=b
RewriteCond %{REQUEST_URI} (.*)
RewriteCond %{QUERY_STRING} (.*)
RewriteRule .* ${map2:%1%2}? [L,NC,R=302]


That seems to only try to do the map lookup based on the QUERY_STRING.
 Obviously the second match is over-riding the first, but I'm not
quite sure how to stop that.

---------------------------------------------------------------------
The official User-To-User support forum of the Apache HTTP Server Project.
See <URL:http://httpd.apache.org/userslist.html> for more info.
To unsubscribe, e-mail: users-unsubscr...@httpd.apache.org
   "   from the digest: users-digest-unsubscr...@httpd.apache.org
For additional commands, e-mail: users-h...@httpd.apache.org

Reply via email to