The approach will be to to filter the matching HTTP::host and HTTP::path and to use a pool. In case of no match a redirect applies.
Make sure to use a ‘string tolower’ to compensate varying cases.
There is another option to cover the query part of the URI as well (the stuff after the question mark). The full URI (containing both the path and separated query) will be used in combination with the original hostname for a redirect to https by using the following sample code:
when HTTP_REQUEST {
if {([string tolower [HTTP::host]] eq "testsite.com") && ([string tolower [HTTP::path]] eq "/support/lic")}
pool pool_of_licservers
} else {
HTTP::redirect https://[HTTP::host][HTTP::uri]
}
}