Forum Discussion

f5_user_7996's avatar
f5_user_7996
Icon for Nimbostratus rankNimbostratus
Aug 14, 2012

Include a small image on the offline page

Hi all,

 

 

Hope somebody can help me.

 

 

We are using BIG-IP V10.2.4 and I would like add an image to the offline page in addition to our existing textual offline message. Below is the irule of our current offline page:

 

 

 

 

when HTTP_REQUEST { \

 

HTTP::respond 200 content {

 

 

Customer site unavailable

 

 

 

The customer website is currently unavailable.

 

we are working on the site anf hope to have it resolved shortly.

 

 

please check back again soon or telephone us.

 

 

 

 

}

 

}

 

 

In addition to the above text we would like to add a small image of our company on the top-left side of the page.

 

 

What are the steps and procedures that I'm going to do.

 

 

 

Cheers,

 

 

OG
  • Richard__Harlan's avatar
    Richard__Harlan
    Historic F5 Account
    This should walk you through the process

     

     

    https://devcentral.f5.com/wiki/iRules.Automatic_maintenance_page___Sorry_page_with_images.ashx
  • You may also want to respond with a 503 so that search engine crawlers don't index this page.
  • Good point Brian. If you do want to use a 200, make sure to set cache-control no-cache and pragma no-cache:

     

     

    HTTP::respond 200 content $content Cache-Control No-Cache Pragma No-Cache

     

     

    Aaron
  • Hi,

     

    How can I put converted 64 version of the image to the data group, will it be per line or at once?

     

     

    Cheers,

     

    OG

     

     

  • Hi OG,

     

     

    Check this example on the class wiki page:

     

     

    https://devcentral.f5.com/wiki/iRules.class.ashx

     

    This example extracts an base64 encoded image from a class to send in an HTTP response when load balancing failed:

     

     

    Aaron