I'd like to share this idea I had for changing the logo of a website during
a holiday period:
just adding some Rewrite directives in a .htaccess with time conditions...
so no need to worry about overwriting the logo but just produce a new logo and decide previously the time period it should be changed.
The code:
#CHRISTMAS LOGO
#FROM 10 DECEMBER TO 31
RewriteCond %{TIME_DAY} >09
RewriteCond %{TIME_DAY} <32
RewriteCond %{TIME_MON} >10
RewriteRule img/logo_common.png$ /img/logo_xmas.png [L,NC]
#FROM JANUAR 1st to 6th
RewriteCond %{TIME_DAY} >00
RewriteCond %{TIME_DAY} <07
RewriteCond %{TIME_MON} <02
RewriteRule img/logo_common.png$ /img/logo_xmas.png [L,NC]
It works fine, just some improvements i'd like to add:
Actually I'd like to join the two conditions sets in one only but I idn't realize yet how to do it, and also
RewriteCond %{TIME_DAY} <=07
seems not working so the hard part understanding numbers related to dates....
Any comment?