Forum Discussion
Jboswell_33438
Nimbostratus
Oct 29, 2015How do I add html content and an ifile in the same maintenance page irule?
Sorry about such a seemingly simple question but I'm new to this and I am struggling trying to make it work. I have no problem displaying either HTML or an image but I can't get both to display at t...
Stanislas_Piro2
Cumulonimbus
Oct 30, 2015try this kind of irule:
when HTTP_REQUEST {
switch [HTTP::path] {
"/maintenance/logo.png" {
HTTP::respond 200 content [ifile get "logo.png"] "Content-Type" "image/png"
return
}
"/maintenance/maintenance.html" {
HTTP::respond 200 content [ifile get "maintenance.html"] "Content-Type" "text/html"
return
}
default {
set dpool [LB::server pool]
if { [active_members $dpool] == 0 } { HTTP::redirect "/maintenance/maintenance.html"; unset dpool; return}
unset dpool
}
}
}
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