Forum Discussion
bobbyd1282_1424
Nimbostratus
Apr 29, 2014F5 Lite Maintenance Page iRule works on Virtual Servers except when the Virtual Server is Listening on 443 (HTTPS)
Hello
I'm not a programmer and so I'm no too good with iRules but, here is my issue. Any help would be great. I want a simple message (no images or anything) to be displayed when 0 pool members a...
bobbyd1282_1424
Nimbostratus
Apr 29, 2014when HTTP_REQUEST {
sets the timer to return client to host URL
set stime 10
Use the Host header value for the responses if it's set. If not, use the VIP address.
if {[string length [HTTP::host]]}{
set host [HTTP::host]
} else {
set host [IP::local_addr]
}
Check if the URI is /maintenance
switch [HTTP::uri] {
"/maintenance" {
Send an HTTP 200 response with a Javascript meta-refresh pointing to the host using a refresh time
HTTP::respond 200 content \
"Maintenance page \
We are sorry! This page is currently under maintenance and should be available as soon as our work is complete. Sorry for any inconvenience." "Content-Type" "text/html"
return } } If the pool is down, redirect to the maintenance page if { [active_members ] < 1 } { HTTP::redirect "http://$host/maintenance" return } }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