Forum Discussion
krish_net_18726
Nimbostratus
Aug 31, 2015How to configure a i-rule with image (company logo) on it
HI all,
Need help to create a i-rule for maintenance page with image that should come whenever the website is down.
We do have maintenance page configured but w/o image. Please find the same & s...
Stefan_Klotz
Cumulonimbus
Sep 01, 2015What about this?
when HTTP_REQUEST {
if { [active_members ] < 1 } {
switch [string tolower [HTTP::uri]] {
"/maintenance/logo.gif" {
HTTP::respond 200 content [b64decode "Base64 decoded Image string"] "Content-Type" "image/gif"
}
"/maintenance/index.html" {
HTTP::respond 200 content "html-code of the sorrypage (escape all ")"
}
default {
HTTP::redirect "https://[HTTP::host]/maintenance/index.html"
}
}
} elseif { [string tolower [HTTP::uri]] eq "/maintenance/index.html" } {
HTTP::redirect "https://[HTTP::host]"
}
}
If you are using external CSS or even JavaScript files, we prefer to include everything in a single HTML-file. For the image you can also use something like this:
Hope that helps you and/or point you in the right direction.
Ciao Stefan 🙂
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