Tomeq_93315
Nov 25, 2013Nimbostratus
redirection iRule based on IP and URI
Hi,
I'm having problem with the following iRule. I does not work. It looks like it's not trying even the first condition:
when HTTP_REQUEST {
log local0. "Client [IP::client_addr]"
if { ([IP::addr [IP::client_addr] equals x.x.x.x]) and ([HTTP::uri] eq "/someuriwithparameters*") }
{ log local0. "Client [IP::client_addr] matched case 1"
pool POOL1 }
if { ([IP::addr [IP::client_addr] equals y.y.y.y]) and ([HTTP::uri] eq "/someuriwithparameters2*") }
{ log local0. "Client [IP::client_addr] matched case 2"
pool POOL1 }
}
It just drops "Client x.x.x.x" to /var/log/ltm but nothing happens, redirection doesn't work... I've tried IP:addr conditions and HTTP:uri with brackets "()" and without. No change at all.
Any mistake in code here?
Thanks, Tomek