Forum Discussion
3 Replies
Sort By
- Samir_Jha_52506Noctilucent
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_KhanNimbostratus
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
- Jad_Tabbara__J1Cirrostratus
Hello Habib,
Replace the line
HTTP::path "/maintenance/ServerMaintenance.htm"
by
HTTP::uri "/maintenance/ServerMaintenance.htm"
Not sure this will resolve your issue but just to correct it
Regards