Block access to files during certain hours of the day

Topics focus on Web Developments, Programming, Database, Digital Marketing Tutorials, Code Snippets, SEO, Social Media Marketing and Inspirational articles.

Block access to files during certain hours of the day

Here, I wrote the article about how to block access to files during certain hours of the day via htaccess. Using below code you can block the access to file during specified time.

1
2
3
4
5
6
Options +FollowSymLinks
RewriteEngine On
RewriteBase /
# If the hour is 16 (4 PM) Then deny all access
RewriteCond %{TIME_HOUR} ^16$
RewriteRule ^.*$ - [F,L]

Add comment


 

Pin It on Pinterest

Share This