Need iRule for Redirect http to different pool of https web servers with certificate terminated in web servers
Hi Guys,
I need help to Need iRule for Redirect http to different pool of https web servers with certificate terminated in web servers.
I have 4 sites hosted in 2 servers with URL's below. Certificate are terminated at Server side pool_Server1 aaa.com/www.aaa.com bbb.com/www.bbb.com pool_Server2 ccc.com/www.ccc.com ddd.com/www.ddd.com
I used this reference, when user access http i have iRule to redirect them to https. But i dont have idea how to redirect to pool of servers if current are https. I save this link below as reference. https://devcentral.f5.com/questions/irule-for-virtual-server-to-redirect-to-different-pool
when CLIENT_ACCEPTED { Save the name of the VS default pool set default_pool [LB::server pool] } when HTTP_REQUEST {
switch -glob "[string tolower [HTTP::host][HTTP::path]]" {
"*seattle.gov/util*" {
pool spu-util-pool
}
default {
pool $default_pool
}
}
}
Please advice. Thanks