Forum Discussion
Klaus_Gerthein1
Nimbostratus
Jul 20, 2011Problem with b64decode lindex in Version 10.2.1
Hello,
I would like to send a sorry page when all pool members are down.
I found a solution contributed by citizen_elah .
1. Generate base64 encoded file from a screen shot ....
greenasp_41938
Nimbostratus
May 02, 2013I have tried every combination possible and can get an image to display. I placed the images in the data group list as a string, but the images do not get displayed. However, the rest of the page shows.
when HTTP_REQUEST {
set VSPool [LB::server pool]
if { [active_members $VSPool] < 1 } {
log local0. "Client [IP::client_addr] requested [HTTP::uri] no active nodes available..."
if { [HTTP::uri] ends_with "/logo.png" } {
HTTP::respond 200 content [b64decode [class element -value 0 logo_image_class]] "Content-Type" "image/png"
} else {
if { [HTTP::uri] ends_with "?offlineimage.png" } {
HTTP::respond 200 content [b64decode [class element -value 0 offlineimage_class]] "Content-Type" "image/png"
} else {
HTTP::respond 200 content "
We'll Be Back
The website is offline for scheduled maintenance. We apologize for any inconvenience.
We expect to be online shortly. Please check again in a few hours.
"
}
}
}
}
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