Irule Help
Dears,
Need some help on the F5 configuration. The requirements are: 1.Do not apply URI redirect if the request is coming from a particular subnet. 2.Apply URI redirect otherwise.
Tried the below Irules its not working. Please help urgent.
when HTTP_REQUEST { if { ([HTTP::uri] equals "/") and ([IP::client_addr] != "10.1.2.0/24") } { HTTP::redirect "/cams" } }
when HTTP_REQUEST { if { [IP::addr [IP::client_addr] eq 10.1.2.0/24] } { return do nothing } elseif { [HTTP::uri] equals "/" } { HTTP::redirect "/cams" }
}
when HTTP_REQUEST { if { { [IP::client_addr] = "10.1.2.0/24" } } { return do nothing } else { HTTP::redirect "http://[HTTP::host]/cams" } }
Thanks & Regards, Sam