From c3cdf0238a74bf4efe9fdc495c116ef182376a1e Mon Sep 17 00:00:00 2001 From: Ionut Morariu Date: Sun, 30 Aug 2015 18:16:20 +0200 Subject: [PATCH] .htaccess hardening --- .htaccess | 2 +- htaccess.txt | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index ecf1097c0..203e2dd8d 100644 --- a/.htaccess +++ b/.htaccess @@ -44,7 +44,7 @@ RewriteRule .* index.php [L] ## Begin - Security # Block all direct access for these folders -RewriteRule ^(cache|bin|logs|backup)/(.*) error [L] +RewriteRule ^(.git|cache|bin|logs|backup)/(.*) error [L] # Block access to specific file types for these folders RewriteRule ^(system|user|vendor)/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$ error [L] ## End - Security diff --git a/htaccess.txt b/htaccess.txt index ce48b2674..203e2dd8d 100644 --- a/htaccess.txt +++ b/htaccess.txt @@ -44,7 +44,7 @@ RewriteRule .* index.php [L] ## Begin - Security # Block all direct access for these folders -RewriteRule ^(cache|bin|logs)/(.*) error [L] +RewriteRule ^(.git|cache|bin|logs|backup)/(.*) error [L] # Block access to specific file types for these folders RewriteRule ^(system|user|vendor)/(.*)\.(txt|md|html|yaml|php|twig|sh|bat)$ error [L] ## End - Security