Forum Discussion
Junzo
Oct 20, 2021Nimbostratus
iRule for sorry page and Maintenance page
Hi Implemented 2 iRule to 1 Virtual Server. Sorry.html and Maintenance.html page. Both are working properly individually. case1: server down -> sorry.html case2: maintenance time -> maintena...
spalande
Oct 25, 2021Nacreous
I thought of another idea of using event disable command to stop executing other iRules if maintenance page iRule is triggered. Use higher priority for sorry page iRule or move it to the top.
when HTTP_REQUEST priority 100 {
set maintenance_start_time "0000";
set maintenance_end_time "2359";
set maintenance_day "Sunday";
scan [clock format [clock seconds] -format {%A %k %M}] {%s %s %s} cur_day cur_hour cur_minute
set cur_time ${cur_hour}${cur_minute}
if { ($cur_day eq $maintenance_day) &&
($cur_time >= $maintenance_start_time) &&
($cur_time <= $maintenance_end_time) } {
HTTP::respond 200 ifile "/Common/maintenance.html"
event disable all
}
}
Recent Discussions
Related Content
DevCentral Quicklinks
* 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
Discover DevCentral Connects