Forum Discussion
iRule assist - Apology page
Hello Guys, Quick question and need help with the iRule below. The goal is to setup an apology page when the all the pool members are down. so using the iRule below (Thank you nitass)
========================================================================
when HTTP_REQUEST { if {[active_members [LB::server pool]] < 1} {
switch [HTTP::uri] {
"/" { HTTP::respond 200 content [ifile get "apology"] }
"/apology_pic" { HTTP::respond 200 content [ifile get "apology_pic"] }
}
}
}
========================================================================
So when the user goes to and the pool members down the page is displayed fine. But lets say if the user is a smartypants and knows his vir dir and types in -
www.site.com/getstatus.aspx then the apology page does not come up. Looking at the above rule I assumed that switch [HTTP::uri] will handel this...Am I wrong? How do I fix the above iRule?
1 Reply
- Josiah_39459Historic F5 Account
Use default instead of '/'. So have your apology_pic first and then default for anything else.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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