Hi Bhanu,
you are on the right way. I also played with similar requirements in the past, but I always put in the base64 string directly into the iRule. Something like this:
when HTTP_REQUEST {
if { [active_members ] < 1 } {
switch [string tolower [HTTP::uri]] {
"/maintenance/logo.gif" {
HTTP::respond 200 content [b64decode ""] "Content-Type" "image/gif"
}
"/maintenance/index.html" {
HTTP::respond 200 content ""
}
default {
HTTP::redirect "http://[HTTP::host]/maintenance/index.html"
}
}
} elseif { [string tolower [HTTP::uri]] eq "/maintenance/index.html" } {
HTTP::redirect "http://[HTTP::host]"
}
}
Please give it a try this way.
btw. I'm using this URL to base64 encode pictures.
Ciao Stefan 🙂