Forum Discussion
F5workuserguy
Altostratus
Jun 28, 2021maintenance iRule with 404
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"
}
}
=====================================================
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.
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