From 41c0f8080eaa23aa19ca98c92fc77238bf29e9d1 Mon Sep 17 00:00:00 2001 From: colymba Date: Sat, 20 Apr 2013 10:45:18 +0300 Subject: [PATCH] FIX Only block root vendor folder Use RewriteRule instead to take in account any subfolder via RewriteBase. Deny ss-cache and composer via RewriteRule too. --- dev/install/install.php5 | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/dev/install/install.php5 b/dev/install/install.php5 index 818d4d6b404..f73a2e18606 100644 --- a/dev/install/install.php5 +++ b/dev/install/install.php5 @@ -1277,16 +1277,15 @@ HTML; ErrorDocument 404 /assets/error-404.html ErrorDocument 500 /assets/error-500.html - - RedirectMatch 403 /silverstripe-cache(/|$) - RedirectMatch 403 /vendor(/|$) - RedirectMatch 403 /composer\.(json|lock) - - SetEnv HTTP_MOD_REWRITE On RewriteEngine On $baseClause + + RewriteRule ^vendor(/|$) - [F,L,NC] + RewriteRule silverstripe-cache(/|$) - [F,L,NC] + RewriteRule composer\.(json|lock) - [F,L,NC] + RewriteCond %{REQUEST_URI} ^(.*)$ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !\.php$