Hi Chris,
You can wrap all the logic in the HTTP_REQUEST event in an 'if' statement which checks the path. You basically have it listed in your post above. I'm not sure whether you want to match on the full URI matching /portal/site exactly, the path matching /portal/site exactly or the path starting with /portal/site. Here's an example which checks if the path is exactly /portal/site/.
when HTTP_REQUEST {
if {[HTTP::path] eq "/portl/site/"}
if { [IP::addr [IP::remote_addr] equals 10.32.186.0/255.255.252.0] } {
Redirect from the HTTP VIP to the HTTPS VIP
HTTP::redirect “https://site.com/portal/site/NEW"
} elseif {[IP::addr [IP::remote_addr] equals 10.0.0.0/255.0.0.0] } {
Redirect from the HTTP VIP to the HTTPS VIP
HTTP::redirect "https://site.com/portal/site/OLD"
} elseif {[IP::addr [IP::remote_addr] equals 10.20.20.0/255.255.252.0] } {
Use the HTTP pool for this request. Or remove this line and the request will go to the default pool on the VIP
pool http_pool
}
}
}
Aaron