Forum Discussion
Maintenance Page Was Not Functioning Correctly : Sub-Pages Shows 404 Error
Hi!
Yeah, there was a space missing on the second rule and I forgot to change the event you initially posted. 🙂
Here are the revised rules. They should work:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
HTTP::uri "/default.html"
pool maintenance_page
}
}
when HTTP_REQUEST {
if { [active_members [LB::server pool]] == 0 } {
set uri [string tolower [HTTP::uri]]
if { not ($uri equals "/default.html" or $uri starts_with "/img/") } {
HTTP::uri "/default.html"
}
pool maintenance_page
}
}
Question: What do you actually want to achieve with the rule? Do you want a rule that you can activate manually during a maintenace window or do you want one that automatically shows information to customers if all pool members are down?
The latter can also be achieved by the fallback host in the http profile, however, not as pretty as URI rewriting since customers would get redirected and can't hit refresh to stay on the same page they were on before the pool failure.
Good luck!
Kind regards, Patrik
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)Recent Discussions
Related Content
* 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