Forum Discussion
Sorry Page Content Question.
I have written an irule to display an HTML sorry page if there is ever less then 1 available member in the pool " if { [active_members [LB::server pool]] < 1 }". That all works great but I am having difficulty getting my html into the irule. The page has a base 64 encoded background and a base64 encoded image but the rest is just html. I am using a "{ HTTP::respond 200 content " Is there syntax I am missing? Do I need to specify the entire page as base 64 and do a decode or something?
Thanks
1 Reply
- cjunior
Nacreous
You can use iFile too, but, I think you want something like this:
when RULE_INIT { set ::background BACKGROUNDBASE64HERE= set ::sorrypage CONTENTOFBASE64HERE== } when HTTP_REQUEST { if { [active_members [LB::server pool]] < 1 } { if { [HTTP::uri] ends_with "background.jpg" } { HTTP::respond 200 content [b64decode $::background] } else { HTTP::respond 200 content [b64decode $::sorrypage] } } }
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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