From cb791f03ff3308b744c6db94a50a8a3c9905ff2b Mon Sep 17 00:00:00 2001 From: Bachir Soussi Chiadmi Date: Sat, 12 Oct 2013 13:08:36 +0200 Subject: [PATCH] fixe the 302 redirection cache probleme with headers in htaccess --- .htaccess | 17 +++++++++++++---- maintenance/index.html | 35 ++++++++++++++++++----------------- 2 files changed, 31 insertions(+), 21 deletions(-) diff --git a/.htaccess b/.htaccess index e2787cfa..b47a799c 100755 --- a/.htaccess +++ b/.htaccess @@ -116,14 +116,23 @@ DirectoryIndex index.php index.html index.htm RewriteCond %{REQUEST_URI} !=/favicon.ico RewriteRule ^ index.php [L] + ## local # RewriteCond %{REMOTE_ADDR} !^127\.0\.0\.1 - # maison quentin + ## maison quentin # RewriteCond %{REMOTE_ADDR} !^86\.68\.188\.175 - # materio + ## materio # RewriteCond %{REMOTE_ADDR} !^212\.198\.136\.215 - # maison bach + ## maison bach # RewriteCond %{REMOTE_ADDR} !^82\.230\.62\.145 - # RewriteRule !maintenance http://www.materio.com/maintenance [L,R=302] + # RewriteRule !maintenance http://www.materio.com/maintenance [L,R=302,E=nocache:1] + + ## http://mark.koli.ch/2010/12/set-cache-control-and-expires-headers-on-a-redirect-with-mod-rewrite.html + ## Set the response header if the "nocache" environment variable is set + ## in the RewriteRule above. + # Header always set Cache-Control "no-store, no-cache, must-revalidate" env=nocache + ## Set Expires too ... + # Header always set Expires "Thu, 01 Jan 1970 00:00:00 GMT" env=nocache + # Rules to correctly serve gzip compressed CSS and JS files. # Requires both mod_rewrite and mod_headers to be enabled. diff --git a/maintenance/index.html b/maintenance/index.html index 16de801a..b2d87cf2 100755 --- a/maintenance/index.html +++ b/maintenance/index.html @@ -5,7 +5,8 @@ - + + @@ -13,28 +14,28 @@ - - + + Site under maintenance | materiO’ - - - + + +