Forum Discussion
J_Saunders_4728
Jun 19, 2012Nimbostratus
Redirect 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:
...
Michael_Yates
Jun 19, 2012Nimbostratus
Hi J Saunders,
- Will the above work for both HTTP and HTTPS VIP's?
Yes.
- Is 'server pool' an actual F5 generic command? Or should I be specifying the pool name
Yes. In this situation you are specifically using LB::server pool, which returns the pool of the currently selected member.
- If 'server pool' is an F5 command, then I assume I can use this 1 iRule for all of my VIPs
Yes. It would dynamically detect the information.
If you would like to verify you can add a logging statement and then look in your LTM Log:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
log local0. "Server Pool: [LB::server pool]"
HTTP::redirect "http://www.google.com"
}
}
Hope this helps.
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