Forum Discussion
iRule to display static HTML 'sorry' page on empty pool not rendering on IE, Firefox - Chrome works
- May 23, 2019
UPDATE: Something (I don't know what) is keeping some of the images from rendering correctly in IE. changed it to a different image it works a treat with the below configuration (external image, 503, html inline in the irule).
Thanks again for the assistance.
Thanks all for the suggestions. I tried it as a 200 and am currently sending a 503 at the customer's request.
when LB_FAILED { if { [active_members [LB::server pool]] == 0 } { HTTP::respond 503 content { <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3c.org/TR/1999/REC-html401-19991224/loose.dtd"> <HTML xmlns="http://www.w3.org/1999/xhtml"> <HEAD> <TITLE> Customer </TITLE> <META http-equiv=Content-Type content="text/html; charset=utf-8"> <STYLE type=text/css>BODY { FONT-SIZE: 15px; COLOR: #666; FONT-FAMILY: Arial, Helvetica, sans-serif } TD { FONT-SIZE: 15px; COLOR: #666; FONT-FAMILY: Arial, Helvetica, sans-serif } TH { FONT-SIZE: 15px; COLOR: #666; FONT-FAMILY: Arial, Helvetica, sans-serif } BODY { MARGIN: 30px 0px 0px; BACKGROUND-COLOR: #fff } SPAN { FONT-WEIGHT: LIGHTER; FONT-SIZE: 120px; COLOR: #ccc; FONT-FAMILY: Arial, Helvetica, sans-serif } </STYLE> </HEAD> <BODY> <TABLE cellSpacing=0 cellPadding=0 align=center border=0> <TBODY> <TR> <TD style="PADDING-RIGHT: 80px"> <p>This service is currently unavailable.</p> <p>Please contact the Service Desk at<br> 1-800-123-4567 for further assistance</p> </TD> <TD> <SPAN style="FLOAT: left" class="LARGELIGHT"> ( </SPAN> </TD> <TD vAlign=center> <SPAN style="FLOAT: right; VERTICAL-ALIGN: middle"> <IMG alt="Customer" src="https://www.customer.com/img/media-downloads/logo-customer-lores.jpg" width="400" height="100"> </SPAN> </TD> </TR> </TBODY> </TABLE> </BODY> </HTML> } } }
Still renders correctly on Chrome and Firefox, not on IE.
Here's a how the html document looks - I realize that it may be better to put the image on the LTM as an ifile. It's as likely to be removed in the future as the external image is I suppose.
< ifile not used >
Per the HTTP RFC 2616,
**************
302 Found
"The requested resource resides temporarily under a different URI. Since the redirection might be altered on occasion, the client SHOULD continue to use the Request-URI for future requests. This response is only cacheable if indicated by a Cache-Control or Expires header field.
The temporary URI SHOULD be given by the Location field in the response. Unless the request method was HEAD, the entity of the response SHOULD contain a short hypertext note with a hyperlink to the new URI(s)."
**************
If you want to do a redirect, you should include the HTTP Location header in the response with the appropriate URI. I suspect some of the browsers, upon seeing the 302 status code, are requiring the Location header and, upon not finding it, won't continue with the response. If you do not want to do a redirect, use a 200 status code instead, as Jimmy L suggested.
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