How to make a rewrite rule time-dependent?

You can easily make a rewrite rule time-dependent. To do this, you should 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 9AM.

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:23AM.

  • 0 Users Found This Useful
Was this answer helpful?

Related Articles

Brute Force Attack – What it is and How to Block It

Brute-force is a method of guessing your password by trying combinations of letters, numbers and...

What is pdftoppm and is it supported by Hostlantern?

Pdftoppm is a library that handles the conversion from Portable Document Format (PDF) files to...

How to clear your Internet browser’s cookies?

Sometimes you may need to clear the cookies saved by your browser. Basically the cookies...

Hacked Website

The most common reasons for a hacked (defaced) website include: - Outdated web application....

How to clean my files from malicious code?

If your website has been hacked and malicious content has been inserted into your files, you...