Forum Discussion

Ger_Ryan_32314's avatar
Ger_Ryan_32314
Icon for Nimbostratus rankNimbostratus
Jan 27, 2014

Need to display logo on Maintenance page

Have set up irule to display Maintenace page. Can get the wording back when maintenace page is served up but cannot get Logo to Display. Have imported html file and logo using ifiles. Using following irule when HTTP_REQUEST { if {[active_members [LB::server pool]] < 1} { switch [HTTP::uri] { "/bolfg.logo.png" { HTTP::respond 200 content [ifile get "bolfg.logo.png"] } default { HTTP::respond 200 content [ifile get "bolfg.main.html"] } } } }

 

I am new to irules so am sure the above is incorrect....

 

  • Your iRule appears to be fine. So after uploading the files under System - File Management - iFile List, you also need to define them again under Local Traffic - iRules - iFile List. This is the name that you'll reference in your iRule. Otherwise, there may actually be something wrong with the image. If you're sure the image is good, you may also want to add a Content-Type to the iFile declaration:

    HTTP::respond 200 content [ifile get "bolfg.logo.png"] "Content-Type" "image/png"
    
  • Thanks Kevin for your answer. I added content-type to ifile declaration but still no joy on image. I will remove image and readd it again through file Mgt and then through ifles list in irules. I will let you know how I get on. Ger

     

  • Kevin Ok Tried readding image but no Joy. When I looked at HTML file I was supplied with I discovered it was missing the body message file. I added this to ifiles through file import and then to iflies through irules. Irule now looks like

     

    when HTTP_REQUEST { if {[active_members [LB::server pool]] < 1} { switch [HTTP::uri] { "/bg_body" { HTTP::respond 200 content [ifile get "BG-Body"] } "/bolfg.logo.png" { HTTP::respond 200 content [ifile get "bolfg-logo-test"] "Content-Type" "image/png" } default { HTTP::respond 200 content [ifile get "bolfg-test-main"] } } } }

     

    But still no Joy getting Logo come out on maintenace page. Any Ideas??

     

  • If you add that web page and image to a local web server, and observe it directly from a browser, does it look right? I'm not sure I understand the "/bg_body" component. Assuming the default action is to produce an HTML file, and that HTML file would contain object references like "/bolfg.logo.png", what does "/bg_body" in that document represent?