Forum Discussion
Maintenance page iRule. Need redirect AND rewrite.
- Aug 22, 2014
OK, this is what i did which did the trick:
Added the maintenance server as a node on the LTM Create a pool called maintenance_pool and added my maintenance page server to it. Created an irule called maintenace_page with the following in it:
when HTTP_REQUEST { if {[active_members [LB::server pool]] < 1 } { pool maintenance_pool } }
Applied the rule to the Virtual servers needed. Voila. Works like a charm!
I really did not want to host the maintenance page on the LTM as we often change those pages and it is easier for the DEVs to do it directly on the server itself.
Thanks again for your help OTS02.
The LTM can serve out a good looking page (with images) from an iRule. It does take some doing though. You have to encode the images in base64 and load them into a class file. Here is a good link to some work that nitass has done: https://devcentral.f5.com/questions/maintenance-page
You will, of course, need to add some logic to keep an eye on the www.xyz.com pool. If you simply change the host header, after serving the maintenance page, you will create a race condition that will probably be terminated by the LTM.
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