Forum Discussion

drumik_61546's avatar
drumik_61546
Icon for Nimbostratus rankNimbostratus
Oct 21, 2009

http:respond method

I found a great KB on how to set up a maintanance page

 

 

http://devcentral.f5.com/Wiki/default.aspx/iRules/LTMMaintenancePage.html

 

 

Evertything working but we don't want to use redirect page and the html error page contains some images and I can't figure out how to make them load with http::respond method.

 

 

 

when HTTP_RESPONSE {

 

if { [HTTP::status] == 404} {

 

set error_html [lindex $::error_html 0]

 

set style.css [lindex $::error_style_css 0]

 

set l1is_logo.gif [b64decode [lindex $::error_l1is_logo_gif 0]]

 

 

HTTP::respond 200 content $tsa_error_html "Content-Type" "text/html"

 

 

 

HTTP::respond 200 content $tsa_error_style_css "Content-Type" "text/css"

 

 

 

HTTP::respond 200 content $tsa_error_l1is_logo_gif "Content-Type" "text/css" }}

1 Reply

  • The problem is, if you want to host a page on the LTM, it needs to act as a web server. The main page (HTML) would be the first response, and the browser asks for all references (like images, css, etc). Check out this article, which gives a way to host a page with images on the LTM, but my suggestion is to setup a couple of "sorry" servers that you can redirect to. It really makes things easier as you can manage the html content easily, instead of encoding it special for LTM.

     

     

    http://devcentral.f5.com/weblogs/jason/archive/2009/05/12/host-that-sorry-page-on-your-big-ip.aspx

     

     

    DeVon