Forum Discussion
kgaigl
Cirrocumulus
Hi eaa,
thanks a lot, but I can test it not before next week.
one question: in another IRule there is a string:
if {!([class match [IP::client_addr] equals private_net])}
could I use the expression "private_net" to shorten the rule?
Nov 26, 2019
Yes, you can use instead of switch statement.
when HTTP_REQUEST {
if { ([HTTP::host] equals "domain.com") and ([string tolower [HTTP::uri]] starts_with "/internal") } {
if { not ([class match [IP::client_addr] equals private_net]) } {
HTTP::redirect "https://domain.com/home"
# or
# HTTP::uri "/home"
}
}
}