Deny Access By Time
You can deny access to certain directories depending on the time by placing the following code in your .htaccess file in the directory you want to control:
RewriteCond %{TIME_HOUR} ^(13|14|15)$
RewriteRule ^.*$ – [F,L]
RewriteRule ^.*$ – [F,L]
The hours are based on 24 hours in a day (0-23) and each hour you wish to deny access should be seperated with a “|”.
In the above example, nobody could access the directory from 1-3pm.




