Forum Discussion
Dec 05, 2016
Maybe you don't need an iRule. In the HTTP profile it is possible to enter a 'Fallback Host'. The help funtions notes:
"Type the fallback host to send as an HTTP 302 response, when all nodes are down."
You could also use the iRule from this SOL:
https://support.f5.com/kb/en-us/solutions/public/6000/500/sol6510.html
when LB_FAILED {
if { [active_members [LB::server pool]] < 1 } {
The redirect will be sent only if LB_FAILED
was because the pool had no available members.
HTTP::fallback "http://host.domain.com/redirect.html"
}
}