Forum Discussion
Irule for maintenance page-- common VIP for multiple applications
Hi ,
I have a VIP with multiple application (DNS) pointed to one single VIP. The pool selection made based on hostname as in irule below.
I want to add rule to get maintenance page if a specific pool goes down. Kindly help what all options can be choose or share irule which can be used.
- 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
Nimbostratus
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__J1
Cirrostratus
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
Recent Discussions
Related Content
* Getting Started on DevCentral
* Community Guidelines
* Community Terms of Use / EULA
* Community Ranking Explained
* Community Resources
* Contact the DevCentral Team
* Update MFA on account.f5.com