Forum Discussion
1 Reply
Sort By
Basic maintenance page:
when HTTP_REQUEST { if { [active_members [LB::server pool]] < 1 } { HTTP::responsd 200 content "Down for maintenance" } }
So if you want to serve up an image with a basic maintenance page, it gets a bit trickier. What I do is upload the HTML for the maintenance page and the image as iFiles and reference them in the iRule. For example, if I have a page that says "Sorry! Down for maintenance!" and has an img tag that calls for "myimage.jpg", I upload both to the F5 and convert them to iFiles, and change my iRule to something like this:
when HTTP_REQUEST { if { [active_members [LB::server pool]] < 1 } { switch [HTTP::uri] { "/myimage.jpg" { HTTP::respond 200 content [ifile get "myfile_jpg"] } default { HTTP::respond 200 content [ifile get "maintenance_html"] } } } }