Re: Problem matching with ProxyPassMatch

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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: users-unsubscribe@xxxxxxxxxxxxxxxx
For additional commands, e-mail: users-help@xxxxxxxxxxxxxxxx



[Index of Archives]     [Open SSH Users]     [Linux ACPI]     [Linux Kernel]     [Linux Laptop]     [Kernel Newbies]     [Security]     [Netfilter]     [Bugtraq]     [Squid]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Samba]     [Video 4 Linux]     [Device Mapper]

  Powered by Linux