Forum Discussion
Siddharth_Sezhi
Nimbostratus
Sep 21, 2006Redirecting to a webpage when all the health check fails to the memerbs o the pool
Hi,
One of our customer is asking to setup a http redirection to a html page mentioned by them only if the health check fails to all members of the pool which are serving their website. ...
Eric_Grepps_264
Nimbostratus
Oct 13, 2006I am having the same issue, except I am redirecting many applications across many virtual servers.
Would it be safe to apply the same logic by using the following code or is there a more effecient way to handle showing a page when the pool members are down?
when RULE_INIT {
set down_response "
}
when HTTP_REQUEST {
switch [getfield [string tolower [HTTP::uri]] "/" 2] {
app1 {
if { [active_members p1] < 1 } {
HTTP::respond $down_response
} else {
pool p1
}
app2 {
if { [active_members p2] < 1 } {
HTTP::respond $down_response
} else {
pool p2
}
...
appN {
if { [active_members pN] < 1 } {
HTTP::respond $down_response
} else {
pool p1
}
default { pool p_default }
}
}
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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
