Forum Discussion
cjunior
May 22, 2020Nacreous
Hi,
Put "not" before checking the class match. Same as "if not true"
not [class match [IP::client_addr] equals JAVA_Networks]
But in this case, it is better to check "when it is true" to send to a pool otherwise do redirect.
when HTTP_REQUEST {
# Only check when URI is exactly /logon/java
if { [HTTP::uri] equals "/logon/java" } {
# If IP address is in group, it is True
if { [class match [IP::client_addr] equals JAVA_Networks] } {
pool pool_java_uri_443
# Else, that's not True as IP is absent
} else {
HTTP::redirect https://externalpage.com/notjava
}
}
}
Regards