Forum Discussion

kevin_50596's avatar
kevin_50596
Icon for Nimbostratus rankNimbostratus
Aug 15, 2008

Schedule Based Redirect

Is it possible to create an HTTP redirect based on what time it is? Dirty Example:

 

 

when HTTP_REQUEST {

 

if {[thetime] == "8AM-9AM"} {

 

HTTP::redirect "http://redirectsite.org"

 

}

 

}

 

 

Now obviously this won't work, but I'm just trying to give you an idea of what I'm trying to do.

 

 

Any help would be appreciated!

 

Thanks,

 

Kevin

4 Replies

  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    I could have sworn I saw something here recently that made decisions based on day of the week, but I haven't had any luck turning it up, and I can't remember what command(s) were used. I'll keep digging or maybe someone else knows saw it.
  • James_Quinby_46's avatar
    James_Quinby_46
    Historic F5 Account
    Ha! Found it here:

     

     

    http://devcentral.f5.com/Default.aspx?tabid=53&forumid=5&postid=25992&view=topic

     

     

    Original request was for enabling/disabling compression during different time periods. Have a look - I bet it gets you pretty close.
  • Here is another part of the detail that might give you better idea of how to do this. Take a look at the example.

     

     

    http://www.tcl.tk/man/tcl8.5/tutorial/Tcl41.html

     

     

    Hope this helps

     

    CB
  • Thanks for the reply, I'll test everything out and let you know how it goes!