Forum Discussion
Using iRule to redirect F5 traffic
requests are being made for "; but you want to check the page ";, so [HTTP::host] will not cover what you want to check for. That is ONLY checking the host portion of the URL, and from your question you don't want to check that either, you want to check the content of the page ";
1- set a health check for your pool members to do a GET and look for "Offline" in the page.
2- use an iRule to determine the health of a pool and then re direct otherwise:
when CLIENT_ACCEPTED { set DEFAULT_POOL [LB::server pool] }
when HTTP_REQUEST {
if {[active_members $DEFAULT_POOL] == 0} {
HTTP::respond 301 Location "http://www.google.com"
} else {
pool $DEFAULT_POOL
}
}
Soda Cup - I'm pretty new to iRules so I don't understand the Health check on how if that check fails I can redirect?
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