From 6ccfc8ba7d7e47e14f3940a6d6f697a67c97d162 Mon Sep 17 00:00:00 2001 From: FrancescoUK Date: Wed, 30 Dec 2015 22:02:50 +0000 Subject: [PATCH] Improve .htaccess with some security rules (#120) --- .htaccess | 23 ++++++++++++++++++++++- 1 file changed, 22 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index f09da7867..255e6fa6c 100755 --- a/.htaccess +++ b/.htaccess @@ -8,4 +8,25 @@ RewriteEngine On RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d -RewriteRule ^(.*)$ index.php?/$1 [L] \ No newline at end of file +RewriteRule ^(.*)$ index.php?/$1 [L] + +# disable directory browsing +# For security reasons, Option all cannot be overridden. +#Options All -Indexes +Options ExecCGI Includes IncludesNOEXEC SymLinksIfOwnerMatch -Indexes + +# prevent folder listing +IndexIgnore * + +# secure htaccess file + + order allow,deny + deny from all + + +# prevent access to PHP error log + + order allow,deny + deny from all + satisfy All + \ No newline at end of file