From 01d9df4dd0ced9e6c943168846e12c388ba80d50 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michal=20Kv=C3=A1=C4=8Dek?= Date: Fri, 8 Apr 2016 00:13:46 +0200 Subject: [PATCH] FEATURE: add all directories and files into .htaccess to be prevented from viewing from website --- .htaccess | 21 ++++++++++++++++++++- 1 file changed, 20 insertions(+), 1 deletion(-) diff --git a/.htaccess b/.htaccess index 2b8c78ba..9cf66136 100644 --- a/.htaccess +++ b/.htaccess @@ -13,5 +13,24 @@ RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_URI} !^/public/ RewriteRule ^(assets)/(.*)$ public/$1/$2 [L,NC] -#disable viewing all hiden files +# disable viewing all hiden files RedirectMatch 403 /\..*$ + +# disable browsing other files in root +RedirectMatch 403 /composer.* +RedirectMatch 403 /artisan +RedirectMatch 403 /phpunit.xml + +# disable browsing directories +# this should be solved also with Option -Indexes, however... +RedirectMatch 403 /app +RedirectMatch 403 /artisan +RedirectMatch 403 /bootstrap +RedirectMatch 403 /config +RedirectMatch 403 /database +RedirectMatch 403 /modules +RedirectMatch 403 /resources +RedirectMatch 403 /scripts +RedirectMatch 403 /storage +RedirectMatch 403 /tests +RedirectMatch 403 /vendor