Forum Discussion
2 Replies
Sort By
- iaineNacreous
- Andy_McGrathCumulonimbus
Before the age of the iFile feature (I think was in 11.6.1) you had to generate the base64 string of any image you wanted to host on the F5 and store it in either a datagroup or directly within an iRule.
Here is an example with the base64 string in the iRule:
when HTTP_REQUEST { if { [active_members [LB::server pool]] < 1 } { switch [string tolower [HTTP::uri]] { "/mylogo.png" { HTTP::respond 200 content [b64decode "/9j/4AAQSkZJRgABAQEAYABgAAD/2wBDAAQCAwMDAgQDAwMEB...."]"Content-Type" "image/png" } default { HTTP::respond 200 content { Site Maintenance Sorry, something went wrong! Sorry for the inconvenience but we are performing some maintenance at the moment. If you need to you can always , otherwise we will be back online as soon as we can! } } } } }
A little warning on this they can be very large. An image I have which is 256 x 256 px the base64 string was 28,568 characters long so worth only using small images and if you have several images recommend you put them into a data group.