Is it possible to redirect on specific date/time?
For Example ... what would be htaccess code for redirecting website on 30th July, 10 AM?
Here is my current htaccess code, where my requirement (see above) will be included
RewriteEngine On
RewriteBase /
RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ http://%1/$1 [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.+)/$ /$1 [R,L]
RewriteCond $1 !^(index\.php)
RewriteCond %{REQUEST_URI} !(\.png|\.jpg)$
RewriteRule ^(.*)$ index.php?l=$1 [L]
RewriteCond %{THE_REQUEST} ^GET\ /(.+)\.html [NC]
RewriteRule ^ /%1? [R=301,L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^([^\.]+)$ $1.html [NC,L]
You can use this rule (you need to enable mod_rewrite
)
RewriteEngine On
RewriteCond %{TIME} >=20180730100000
RewriteCond %{TIME} <20180730110000
RewriteRule ^ /other_page [R,L]
It will (temporarily) redirect to /other_page
between 10:00:00 AM
and 10:59:59 AM
(only on July 30)
Explanation: %{TIME}
value format is yyyymmddhhiiss
where:
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With