LTM Maintenance Page Lite
Problem this snippet solves: Use the LTM as a webserver as a lite version of a maintenance page. In this case, it returns a maintenance page with text to return when the pool members are not availab...
Published Mar 18, 2015
Version 1.0CodeCentral_194
Cirrus
Joined May 05, 2019
CodeCentral_194
Cirrus
Joined May 05, 2019
CarloS1
Nov 23, 2017Nimbostratus
Hi,
why should I add prefix /maintenance? Why shoukd I make redirect HTTP::redirect "/maintenance"?
Could iRule looks like this below, without redirection. What benefits are when I make this redirection.
when HTTP_REQUEST {
if {[active_members [LB::server pool]] < 1} {
switch [string tolower [HTTP::uri]] {
"/style.css" {
HTTP::respond 200 content [ifile get "style"] "Content-Type" "text/css"
}
default {
HTTP::respond 200 content [ifile get "index"] "Content-Type" "text/html"
}
}
} }