Forum Discussion
J_Saunders_4728
Nimbostratus
Jun 19, 2012Redirect to Maintenance page iRule help
All,
I need to apply an iRule to 3 HTTP and 3 HTTPS VIP's. I want the iRule to redirect users to a maintenance page if none of the pool members are available.
I found this:
when CLIENT_ACCEPTED {
if { [active_members [LB::server pool]] == 0 } {
HTTP::redirect "http://maintenance_site.com" }
}
My questions are:
- will the above work for both HTTP and HTTPS VIP's?
- is 'server pool' an actual F5 generic command? Or should I be specifying the pool name
- if 'server pool' is an F5 command, then I assume I can use this 1 iRule for all of my VIPs
Thanks
3 Replies
Sort By
- Michael_Yates
Nimbostratus
Hi J Saunders,when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { log local0. "Server Pool: [LB::server pool]" HTTP::redirect "http://www.google.com" } }
- J_Saunders_4728
Nimbostratus
Awesome! Thanks for the clarifications. - Arie
Altostratus
Don't forget to set the HTTP response code on the maintenance page to 503. You don't want to run the risk of having Google index your maintenance page (makes the Marketing folks really cranky)...
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