From 5a20fbed64b10bb79024f7f413e4de9697c68b44 Mon Sep 17 00:00:00 2001 From: sminnee Date: Fri, 15 Oct 2010 01:19:01 +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 (from r110241) git-svn-id: svn://svn.silverstripe.com/silverstripe/open/phpinstaller/trunk@112417 467b73ca-7a2a-4603-9d3b-597d59a354a9 --- .htaccess | 4 ++++ install.php | 11 +++++++++++ 2 files changed, 15 insertions(+) diff --git a/.htaccess b/.htaccess index 3b89f24..e8a3913 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 a1bf694..d8458eb 100644 --- a/install.php +++ b/install.php @@ -1122,6 +1122,10 @@ HTML; ErrorDocument 404 /assets/error-404.html ErrorDocument 500 /assets/error-500.html + + RedirectMatch 403 /silverstripe-cache(/|$) + + RewriteEngine On $baseClause @@ -1156,6 +1160,13 @@ TEXT; + + + + + + +