Forum Discussion
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!