Forum Discussion
Gary_Penn_10498
Nimbostratus
May 25, 2006Redirecting during a certain time frame
We need to put one of our websites into a 'maintenance' splash page and would like to automate the process as it will happen in the middle of the night. I've written an iRule that will redirect requests to an alternate site but am not sure if I can use something like CRON with an 'at' command in an iRule?
In searching the postings it looks like I need an iControl to do this? I don't even know what an iControl is and I took 4 days worth of basic and advanced training.
Anyway, can somebody let me know if this is possible. Here is my iRule that I need to turn on at 9pm and turn off at 4am:
when HTTP_REQUEST {
if { [IP::remote_addr] contains "172" }
{
HTTP::redirect https://websiteforinternalusers.com/
}
else
{
HTTP::redirect http://maintenancewebsite.com/
}
}
- Deb_Allen_18Historic F5 AccountThis post on a similar topic: Click here
- Gary_Penn_10498
Nimbostratus
That was perfect, thanks. Here's my final rule for the record. Anybody who wants to redirect (most likely overnight as it is here) at a certain time for external IP's should find this useful:
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