Forum Discussion
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
- rob_carr
Cirrocumulus
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.
- Kevin_Stewart
Employee
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.
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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