Forum Discussion
Moinul_Rony
Altostratus
Feb 10, 2015Maintenance page with iFile problem
Hi I have the following iRule to respond a maintenance html page with referenced CSS and Image file ( CSS and Image files are imported in F5 ) . However I can only get to the maintenance html page bu...
Mark_van_D
Cirrostratus
Feb 10, 2015Moinul,
There are a couple of examples available in the irule section.
But this should do the trick:
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
if { [HTTP::uri] eq "/secure-bd.css" } {
HTTP::respond 200 content [ifile get secure-bd.css] "Content-Type" "text/css"}
if { [HTTP::uri] eq "/404-bd.jpg" } {
HTTP::respond 200 content [ifile get 404-bd.jpg] "Content-Type" "image/jpg"}
if { [HTTP::uri] eq "/bd-logo.png} {
HTTP::respond 200 content [ifile get bd-logo.png] "Content-Type" "image/png"}
} else { HTTP::respond 200 content [ifile get secure-bd-branded.html] "Content-Type" "text/html" "Cache-Control" "no-cache,no-store,must-revalidate" "Expires" "Fri, 01 Jan 1990 00:00:00 GMT"}
}}
I've added in the headers for cache as I had issues with content being cached on a proxy.
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
