Forum Discussion
Mike_Easdon_615
Nimbostratus
Feb 02, 2009Advice on out of service pages
hello,
I have a conundrum with maintaining the out of service pages that serve our web sites when they are, well, out of service.
BigIP has the following configuration (b...
hoolio
Cirrostratus
Feb 03, 2009If the maintenance page contains references to other objects (like images or css, etc) you could rewrite the URI only if the request is to a page that hasn't been rewritten already. You would want to use a path and page that does not exist in the application already:
when RULE_INIT {
Use a prefix for the path that does not already exist in the application
set ::maintenance_prefix "/maintenance/"
The default maintenance page
set ::maintenance_page "maintenance.html"
}
when CLIENT_ACCEPTED {
Save the name of the default pool on the VIP
set default_pool [LB::server pool]
}
when HTTP_REQUEST {
Check if there aren't any active members in the default pool
if { [active_members $default_pool] < 1 } {
Primary members are unavailable. Check if the URI has not already been rewritten.
if {not ([HTTP::path] starts_with $::maintenance_prefix)}{
Rewrite the URI to the maintenance prefix/maintenance page (/maintenance/maintenance.html)
HTTP::uri "$::maintenance_prefix$::maintenance_page"
}
Use the maintenance pool
pool splash_pool
} else {
Use the default pool
pool $default_pool
}
}
Aaron
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