Forum Discussion
Domai_23823
Nimbostratus
Dec 01, 2017Maint page irule help
Hello I am trying to come up with a iRule for maint page. The requirement is -
The page should be displayed when all the servers in the pool are down. The servers will be patched and will be reb...
Samir_Jha_52506
Noctilucent
Dec 01, 2017Small modification made. Please try.
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::respond 200 content [ifile get "Maintenance_html"] noserver "Cache-Control" "no-store, no-cache"
return --Optional
}
elseif { [active_members [LB::server pool]] > 0 } {
check if client access from internal subnet
if { [IP::addr [IP::client_addr]/8 equals 10.0.0.0] } {
pool http_80
} else {
HTTP::respond 200 content [ifile get "Maintenance_html"] noserver "Cache-Control" "no-store, no-cache"
}
}
}
- DomaiDec 01, 2017
Altostratus
That is it perfect thank you.
- Samir_Jha_52506Dec 02, 2017
Noctilucent
can vote if irule solve ur purpose, so other can also refer. Thanks
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
