Forum Discussion
MrRichard
Nimbostratus
Aug 13, 2013How to create iRule to deliver an alternate page response other than 'page unavailable'
When we currently disable one of the virtual servers in our setup, we get an 'unable to display this page' message in the browser. Rather than this, we would like to display a maintenance page so tha...
Dan_Cox_24281
Nimbostratus
Aug 13, 2013Here's what we use on our public web sites. Stored the HTML and images in iFiles for use elsewhere.
when HTTP_REQUEST {
if {[active_members [LB::server pool]] < 1} {
switch [HTTP::uri] {
"/guardian_header.jpg" { HTTP::respond 200 content [ifile get "guardian_header_jpg"] }
"/guardian_logo.jpg" { HTTP::respond 200 content [ifile get "guardian_logo_jpg"] }
default { HTTP::respond 200 content [ifile get "maint_index_html"] }
}
}
}
MrRichard
Nimbostratus
Aug 13, 2013Great thanks Dan. I've not used iFiles yet, so I may look to doing this if all else fails. Cheers :)
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