Forum Discussion
hosting maintenance page via ifile utilizing an irule
I am searching for a solution to an issue a customer has presented. They would like to have a maintenance splash page that will external users will hit when all pool members are down but still allow external users to have access. for a simple "sorry, this page is down for maintenance" page, what files or what kind would need to be referenced within the ifiles. I am very green on iRules and am searching for an irule I can utilize for this. do I need to specify the LB pools within the rule? or can it be a generic irule that when applied to a VS performs this function? F5 has so many capabilities its hard to keep up and learn the ins and outs on the fly. any and all help is always appreciated, thank you!
- Samir_Jha_52506Noctilucent
Hi jerm1020,
Can you please try iRule. Please validate & confirm so that i can modify accordingly
when HTTP_REQUEST { if { [active_members [LB::server pool]] == 0 } { set ifileContent [ifile get "/Common/iFile-index.html"] HTTP::respond 200 content $ifileContent } }
- JinshuCirrus
Hope Below iRule helps. Change the Pool_Name to your server pool name.
when CLIENT_ACCEPTED { if { [active_members Pool_Name ] >= 1 } { pool Pool_Name } else { HTTP::respond 200 content { Sorry Page Sorry, The website is not available. Please try again later } } }
-Jinshu
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