Forum Discussion
KJ_50941
Nimbostratus
Sep 29, 2015how can I add logo to ifile and irule
Hope it clear .I was able to display 503 error once pool members are down, using iFile and irule, but it is very plain Text, and would like to add logo to it. how can I add logo to ifile ?below is th...
IheartF5_45022
Nacreous
Sep 30, 2015A sorry page served from the F5 is usually best
- a self-contained HTML with embedded images/js OR
- can have resources served from a domain other than the domain for which you are displaying the sorry page OR
- can be a 302 redirect to a sorry page on another domain
If you wanted to serve a sorry page and someone else produces it for you and puts it on a webserver for you, you can scoop it up like this and store it as an ifile ;
curl -H "Accept-Encoding:gzip" http://10.9.8.7/sorry.html > /var/class/sorry_html
tmsh create sys file ifile "sorry_html" source-path file:/var/class/sorry_html
tmsh create ltm ifile "sorry_html" file-name "sorry_html"
I tend to use LB_FAILED to serve a page myself as it covers all failure modes, not just when all pool members down;-
when LB_FAILED {
HTTP::respond 503 -version 1.1 content [ifile get "sorry_html"] noserver Accept-Encoding "gzip" Content-Type "text/html;charset=utf-8" Retry-After "300" noserver
}
If you wanted to serve an image scoop it up from server like this;
tmsh create sys file ifile "myimage_png" source-path http://10.9.8.7/myimage.png
tmsh create ltm ifile "myimage_png" file-name "myimage_png"
then in the iRule to display the image;-
HTTP::respond 200 -version 1.1 content [ifile get "myimage_png"] noserver Content-Type "image/png" noserver
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