Forum Discussion
Parveez_70209
Nimbostratus
Mar 07, 2014Maintenance Page Was Not Functioning Correctly : Sub-Pages Shows 404 Error
Hi,
We observed that the maintenance page was not functioning correctly with Sub-pages and showing 404 error.
Actual-URL: https://www.test.com/
URL With sub-URL: https://www.test.com/portal...
Mar 07, 2014
hi Parveez
This would be because you don't rewrite the uri before sending it on to the fallback pool.
Accessing "https://www.test.com/portal/welcome.htm" would make the user end up in ie "http://10.10.10.10/portal/welcome.htm".
Try this instead:
when CLIENT_ACCEPTED {
if { [active_members [LB::server pool]] == 0 } {
HTTP::uri "/default.html"
pool maintenance_page
}
}
Or this one (if your maintenance page has images and they're located in ie /img):
when CLIENT_ACCEPTED {
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
}
}
Good luck!
/Patrik
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