ryank5589
May 21, 2020Nimbostratus
iRule expressions for not-eqauls in datagroup
Hey all,
I am looking to create an irule to match a uri and datagroup list (IP address in datagroup) to send to the pool, then if it matches the same uri and it doesn't match the ip address in the data group, to redirect to a external page. Is there anyway to do this? I was trying to do this using a "not" expression, but that doesn't look to be a valid solution.
Something like this ...
when HTTP_REQUEST {
if { ([HTTP::uri] equals"/logon/java") && ([class match [IP::client_addr] equals JAVA_Networks]) } {
pool pool_java_uri_443
} else {
if { [HTTP::uri] equals"/logon/java" } && ([class match [IP::client_addr] not JAVA_Networks]) } {
HTTP::redirect https://externalpage.com/notjava
}
}
Any input would really be appreciated.
Thanks.