httpd-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Daniel Ruggeri <>
Subject Re: [users@httpd] Problem matching with ProxyPassMatch
Date Fri, 08 Jun 2012 22:35:21 GMT
On 6/7/2012 9:47 PM, Chris DiLorenzo wrote:
> Basically, I need to send requests for /product/detail?bsins=20* to a
> specific load balancer and all other traffic to another one.  I feel
> like I'm pretty close, but I can not get the above directive to work.
> Is it the ? in the URL?

I believe the problem is that ProxyPassMatch does not work on the query
string. I haven't tested to be sure, though.

You can use mod_rewrite to take action based on URI and query string as
well as proxy. This should work for you:
RewriteEngine On
RewriteCond %{REQUEST_URI} ^/product/detail$
RewriteCond %{QUERY_STRING} ^(bsins=20.*)
RewriteRule .* balancer://product-gift/%1

Note the %1 back reference instead of $1 - %X is for cond matches, $X is
for rule matches.

Daniel Ruggeri

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message