Forum Discussion
Maintenance page with an image using iRule and iFile, image never gets displayed
Hello,
Having an issue getting image to display...Have created an iFile and selected an image previously uploaded, iRule calls for that file, however, image never displays, only text. Any assistance would be greatly appreciated.
Used following article as a starting point:
https://community.f5.com/t5/technical-forum/solution-create-a-f5-maintenance-page-with-image-irule-ifile-a/td-p/243434
when HTTP_REQUEST {
if { [active_members [LB::server pool]] < 1 } {
switch [HTTP::uri] {
"/maintenance.png" {HTTP::respond 200 content [ifile get "maintenance.png"] "Content-Type" "image/png" }
default {HTTP::respond 200 content
{ www.website.com is currently in maintenance, sorry for any inconvenience.
}
}
}
}
}
I have tried specifying /Common/maintenance.png, still no show.
When I browse the file system, that image is actually under:
/config/filestore/files_d/Common_d/ifile_d/Common:maintenance.png_62680_1
Many thanks in advance.
- iaineNacreous
Hi
You need to include some html in your HTTP response to instruct the client to get the image. Try using a <img src> tag that points at /maintenance.png (https://www.w3schools.com/tags/tag_img.asp)
Recent Discussions
Related Content
* 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