Hi Chris,
I think you need two different iRules for this. It looks like on the HTTP VIP, you want to redirect specific clients to HTTPS and send the rest to the pool. On the HTTSP VIP, you want to redirect some clients and send the rest to the pool. The syntax you're using for the IP address comparisons and redirects is fine. To send the request to the pool, you can either specify it using the 'pool' command, or just configure a default pool on the VIP and don't specify any action in the iRule. Here's an example for the HTTP VIP:
when HTTP_REQUEST {
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