htaccessファイルで日付や時間でリライトするメモ

3月2日からindex.htmlへアクセスがあった場合、index2.htmlを表示させたい場合
RewriteEngine on
RewriteBase /

RewriteCond %{TIME_YEAR}%{TIME_MON}%{TIME_DAY} >20100301
RewriteRule ^index.html /index2.html [L]


Cronでデプロイするとか、PHPとかで切り替え処理とかいろいろあると思うけど、これが一番お手軽だと思う。

コメント

アーカイブ

2010

2009

2008

2007

コンタクト

longkey1[at]gmail[dot]com