httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Nick Tkach <>
Subject [users@httpd] Cat request + query for rewrite?
Date Thu, 06 Oct 2011 16:21:41 GMT
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

So if I have a request like this:

 and I want to rewrite that to

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:> for more info.
To unsubscribe, e-mail:
   "   from the digest:
For additional commands, e-mail:

View raw message