Forum Discussion
Macaron
Sep 13, 2017Nimbostratus
Displaying maintenance page from the F5 using ifile and irule
Hi All, I am trying to display maintenance page using iFile and iRule but it is not working. I am currently on version 11.5.3 HF1. I created an HTML maintenance page and import it via File Management...
wlopez
Sep 13, 2017Cirrocumulus
I've done something similar using the LB_FAILED event to get the same results. In this example there are three iFiles (CSS, PNG, HTML). You can use an iRule like this one:
when LB_FAILED {
switch [HTTP::path] {
"/css/Unavailable.css" {
HTTP::respond 200 content [ifile get "Maintenance-css"] "Content-Type" "text/css"
return
}
"/img/MaintenanceLogo.png" {
HTTP::respond 200 content [ifile get "Maintenance-png"] "Content-Type" "image/png"
return
}
}
HTTP::respond 200 content [ifile get "Maintenance-html"] "Content-Type" "text/html"
}
Hope this example helps!
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