From a870ea1aa3a8f6b8bf2ead0978052d39ed96a6fe Mon Sep 17 00:00:00 2001 From: sharvey Date: Tue, 31 Aug 2010 01:59:41 +0000 Subject: [PATCH] #5870 Block web requests to silverstripe-cache directory via htaccess RedirectMatch rule or web.config hiddenSegments functionality if using IIS 7.x git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/branches/2.4@110241 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- .htaccess | 4 ++++ install.php | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/.htaccess b/.htaccess index 6b50941..7b0da46 100644 --- a/.htaccess +++ b/.htaccess @@ -13,6 +13,10 @@ ErrorDocument 404 /assets/error-404.html ErrorDocument 500 /assets/error-500.html + + RedirectMatch 403 /silverstripe-cache(/|$) + + RewriteEngine On RewriteCond %{REQUEST_URI} ^(.*)$ diff --git a/install.php b/install.php index 72e90d9..79bcffb 100644 --- a/install.php +++ b/install.php @@ -1103,6 +1103,10 @@ HTML; ErrorDocument 404 /assets/error-404.html ErrorDocument 500 /assets/error-500.html + + RedirectMatch 403 /silverstripe-cache(/|$) + + RewriteEngine On $baseClause @@ -1137,6 +1141,13 @@ TEXT; + + + + + + +