Forum Discussion
Habib_Ulla_Khan
Nimbostratus
Jul 20, 2017Irule 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 pag...
Samir_Jha_52506
Noctilucent
Jul 20, 2017We 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
Jul 20, 2017Hi 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
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects