Forum Discussion
heskez_36146
Nimbostratus
Nov 12, 2013Irule maintanance page with ifile
Hi there,
I'd like to create a maintanance page irule which i can attach to a VIP if necessary.
We've an existing custom prebuild maintanance page with images and css file.
I've uploaded all...
Matt_Dierick
Employee
Nov 12, 2013This mine, working on my BIGIP. If you want to use ifile, you need to get ifile name. Below, I launch 404 ifile (404.html page) and I request each picture in this html page with ifile.
when HTTP_REQUEST {
used for 404 error page. Send each image png file to 404 HTML page.
switch -glob [string tolower [HTTP::uri]]
{
"*.png"
{
Remove slash and png on /imagexxxx.png and call iFile imagexxxxx
HTTP::respond 200 content [ifile get [getfield [string range [HTTP::uri] 1 end] "." 1]]
}
default {}
}
}
when HTTP_RESPONSE {
if { [HTTP::status] == 404 } {
log local0. "Error 404"
ifile 404 is the HTML page with a reference to photoxxxx.png
HTTP::respond 200 content [ifile get 404]
}
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