Forum Discussion
Samir_Jha_52506
Noctilucent
We will create if event inside switch. Please try & update if any issue.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"abc.bbc.com" {
if { [active_members pool_1] < 1 } {
HTTP::redirect "https://www.maintenance.com[HTTP::uri]" }
elseif { pool pool_1 }
}
"xyz.bbc.com" {
if { [active_members pool_2] < 1 } {
HTTP::redirect "https://www.maintenance.com[HTTP::uri]" }
elseif { pool pool_2 }
}
}
}
Habib_Ulla_Khan
Jul 20, 2017Nimbostratus
Hi F5_rock,
I used below irule. maintance page works fine but with below error. The page doesnt load proper may be because the uri trying is in CAPS and LB is not changing to lower it.
when HTTP_REQUEST {
switch [string tolower [HTTP::host]] {
"services.com" {
SSL::disable serverside
if { [active_members pool-http] eq 0 } {
HTTP::path "/maintenance/ServerMaintenance.htm"
pool maintenance-pool
} {
HTTP::path "/xyz"
pool services-pool-http
}
}
Tried this but no help