I have reversed the logic back to the original but now using datagroup instead of the "switch -glob" meaning,
when HTTP_REQUEST {
if { [class match [IP::client_addr] equals internal_subnets] || [class match [HTTP::uri] starts_with URI_DB] || [HTTP::host] equals "app.com"} {
pool app_80_pool
}
else {
HTTP::redirect "http://app.com/sorry.html"
}
}
Now, everything works except the redirect which never works. However, I have just noticed that if I don't use DNS and use IP instead, the redirect works just fine. Can you explain why?