Hello puma,
Here is a version of your rule with indentation to show how the if/else's line up:
if (http_uri contains "/admin") {
redirect to "https://" + tolower(http_host) + tolower(http_uri)
if (http_uri contains "/logon.aspx") {
log "sslpool2" + client_addr
use pool pool2
}
else {
discard
}
}
else {
use pool1
}
If a client makes a request that starts with "/admin", they will be redirected to
https://ORIGINAL_HOST/ORIGINAL_URI. If the request containing "/logon.aspx" always starts with /admin, then the second if will never be reached and pool2 will never be used.
Here is the description of what you described you want to happen:
I have a website which consists of http and https, let say
https://www.mysite.com/admin/logon.aspx. If an user goes to
http://www.mysite.com, the Big IP needs to send traffic to pool1 which loads balance across the nodes. If an user goes to logon.aspx, the Big IP needs to send traffic to pool2 and pool2 consist of a single node.
If I understand your scenario correctly, you have an HTTP virtual server and an SSL proxy on the same host name/IP address. After that, I get a bit confused on how you want the traffic handled.
Do you want all requests containing /admin made via HTTP to be redirected to the SSL proxy?
Do you want any other request (except if it contains /admin) made via HTTP to be load balanced to the pool?
Do you want requests that contain /logon.aspx to be load balanced to pool2, regardless of whether they were made via HTTP or HTTPS?
What traffic do you want discarded?
What traffic do you want to go to pool1?
Perhaps you can provide more detail on the exact logic you want to build into your rule. In general, I think you'll want to come up with two versions of the rule: one for the HTTP virtual server and one for the SSL proxy.
Aaron