Forum Discussion

Srinivasan_G_31's avatar
Srinivasan_G_31
Icon for Nimbostratus rankNimbostratus
Oct 04, 2013

Maintenance Page redirect

Hi Friends, Is there a way i can accomplish the following thing? Once i hit the Virtual server IP, i should first get directed to an informational page which talks about the upcoming maintenance activity on the website and then after few seconds get directed to the home page. Would like this informational page to be sourced from the LTM.

 

2 Replies

  • You can definitely serve the maintenance content from a VS on the BIG-IP, and the content can contain a timing element that will cause the client browser to refresh the page. See this link for an iRule example: https://devcentral.f5.com/wiki/iRules.LTMMaintenancePageLite.ashx

     

    You would need some way to distinguish between the first time a client attaches to the virtual server and any subsequent connection, but an HTTP cookie would probably accomplish this.

     

  • Borrowing from the listed exampled, it might look something like this:

    when HTTP_REQUEST {
        set mainttime "10:00pm Eastern"
        if { not ( [HTTP::cookie exists "maintbanner"] ) } {
            HTTP::respond 200 content "Maintenance AlertThis site will be going down for maintenance at $mainttime. Please complete your session and logoff before then." "Content-Type" "text/html" "Set-Cookie" "maintbanner=1"
        } 
    }
    

    I'm setting a cookie in the maintenance splash page, so that after the refresh it'll bypass this for the rest of the session.