Forum Discussion
How to create iRule to deliver an alternate page response other than 'page unavailable'
When you disable the virtual server the F5 no longer responds on that IP/port, so no iRules will be triggered. I think that you want to disable the servers in the pools instead of the F5 virtual server instead. If all of the pool member servers are disabled, either manually or due to failing health monitors and an HTTP request comes in, a LB_FAILED event will be triggered and you can craft your response. I recommend something simpler, this is the basics of what we use, where your can add your own html, you could also do a HTTP::redirect instead. Remember that the virtual server will need to have an HTTP profile.
when LB_FAILED { log local0.info "LoadBalanceFailureHost [HTTP::host]" HTTP::respond 500 content { Put your HTML here. } }
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