Home
/
Website Help
/
Other
/
How to make a rewrite rule time-dependent?

How to make a rewrite rule time-dependent?

To make a .htaccess rewrite rule time-dependent, add the following line before the rewrite rule you wish to make time-dependent:

RewriteCond %{TIME_HOUR} ^09

This way the rewrite rule following the condition will be executed after 9 AM.

If you wish to use minutes in the condition, you should add:

RewriteCond %{TIME_HOUR}%{TIME_MIN} ^0923

This way the rewrite rule following the condition will be executed after 9:23 AM.

Share This Article