For more information regarding the security incident at F5, the actions we are taking to address it, and our ongoing efforts to protect our customers, click here.

Forum Discussion

bbensten_8485's avatar
bbensten_8485
Icon for Nimbostratus rankNimbostratus
Jul 23, 2014

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

  • 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]
            }
        }
    }