Forum Discussion
Maintenance Page using V11
In its simplest form:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
switch [HTTP::uri] {
"/maintenance_page_logo.jpg" {
HTTP::respond 200 content [ifile get "maintenance_page_logo_jpg"]
}
default {
HTTP::respond 200 content [ifile get "maint_index_html"]
}
}
}
}
So basically what's happening is that if there are no pool members, the iRule will look at the request URI. The first request will most certainly fall through to the default condition and render the maintenance page HTML file. Inside that html you may have other linked content (images, scripts, stylesheets). Example:
So the browser will make subsequent requests for this linked content to finish rendering the page. Since the pool still has no active members, the browser's request for /maintenance_page_logo.jpg will get pulled from an ifile.
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