From 53d145d0f5edbc5f7e9dd2a45b085b4138cc269b Mon Sep 17 00:00:00 2001
From: Mathieu Lutfy <mathieu@bidon.ca>
Date: Mon, 23 Jan 2012 22:45:48 -0500
Subject: [PATCH] refs #1267972 : avoid a loop when index.php is accessed
 directly a creates a wildcard cache file

---
 boost.admin.htaccess.inc | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/boost.admin.htaccess.inc b/boost.admin.htaccess.inc
index ac690eb..0dd5422 100644
--- a/boost.admin.htaccess.inc
+++ b/boost.admin.htaccess.inc
@@ -219,7 +219,8 @@ function boost_admin_htaccess_generate_htaccess() {
     if (variable_get('boost_ssl_bypass', BOOST_SSL_BYPASS)) {
       $string .= "  RewriteCond %{HTTPS} on [OR]\n";
     }
-    $string .= "  RewriteCond %{HTTP_COOKIE} " . variable_get('boost_cookie', BOOST_COOKIE) . "\n";
+    $string .= "  RewriteCond %{HTTP_COOKIE} " . variable_get('boost_cookie', BOOST_COOKIE) . " [OR]\n";
+    $string .= "  RewriteCond %{ENV:REDIRECT_STATUS} 200\n";
     $string .= "  RewriteRule .* - [S=$skip]\n";
     $string .= "\n";
     $string .= "  # GZIP\n";
@@ -262,4 +263,5 @@ function boost_admin_htaccess_array_find($needle, $haystack, $a_not = array()) {
     }
   }
   return $out;
-}
\ No newline at end of file
+}
+
-- 
GitLab