28-Jun-2021 15:15
is there a better way to write this?\
=====================================================
when LB_FAILED {
if { [active_members [LB::server pool]] != 0 } {
} else {
HTTP::fallback "https://maintenance.google.com"
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == "404" } {
HTTP::respond 302 noserver Location "https://maintenance.google.com"
}
}
=====================================================
30-Jun-2021
00:11
- last edited on
04-Jun-2023
19:23
by
JimmyPackets
Hello F5workuserguy.
Try this:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
HTTP::respond 302 noserver Location "https://maintenance.google.com"
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == "404" } {
HTTP::respond 302 noserver Location "https://maintenance.google.com"
}
}
Regards,
Dario.