Forum Discussion
nortendo_279044
Nimbostratus
May 31, 2018irule redirect specific uri maintenance mode timestamp
Hi everybody,
i want to create an irule to redirect to a specific uri during the maintenance mode from saturday at 8h00 am until sunday at 20h00 pm .
I found this example below but i need ...
youssef1
Cumulonimbus
May 31, 2018Hi,
you can try this (simple and functional):
when CLIENT_ACCEPTED {
set START_OFF_TIME [clock scan "01:00 AM"]
set END_OFF_TIME [clock scan "05:00 AM"]
}
when HTTP_REQUEST {
set now [clock seconds]
if { ( $now > $START_OFF_TIME ) && ( $now < $END_OFF_TIME ) } {
HTTP::redirect "http://www.xyz.com/maintenancepage/"
TCP::close
}
}
Reference (Stanislas Piron): https://devcentral.f5.com/questions/irule-based-on-time-50868
Let me now if you need assistance on IT
Regards
Help guide the future of your DevCentral Community!
What tools do you use to collaborate? (1min - anonymous)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