Updates .htaccess files
Adds more security related directives
This commit is contained in:
16
.htaccess
16
.htaccess
@@ -1,6 +1,20 @@
|
||||
# Very simple security for apache webserver - do not remove.
|
||||
#
|
||||
# Restrict access to DotFiles (like .htaccess, .env, .gitignore....)
|
||||
# Do not remove if you are running Apache web server.
|
||||
<FilesMatch "^\.">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# Restrict access to system files
|
||||
<FilesMatch "^(composer.json|composer.lock|artisan|code_of_conduct.md|gulpfile.js|package.json|error_log|phpspec.yml|example.env)">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# Uncomment to restrict access to release text files
|
||||
#<FilesMatch "^(LICENSE|README.md|readme.txt|release-notes.txt)">
|
||||
# Order allow,deny
|
||||
# Deny from all
|
||||
#</FilesMatch>
|
||||
|
||||
|
@@ -4,7 +4,7 @@
|
||||
</IfModule>
|
||||
|
||||
RewriteEngine On
|
||||
|
||||
|
||||
# Redirect Trailing Slashes...
|
||||
RewriteRule ^(.*)/$ /$1 [L,R=301]
|
||||
|
||||
@@ -15,8 +15,20 @@
|
||||
</IfModule>
|
||||
|
||||
# Restrict access to DotFiles (like .htaccess, .env, .gitignore....)
|
||||
# Do not remove if you are running Apache web server.
|
||||
<FilesMatch "^\.">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# Restrict access to system files
|
||||
<FilesMatch "^(composer.json|composer.lock|artisan|code_of_conduct.md|gulpfile.js|package.json|error_log|phpspec.yml|example.env)">
|
||||
Order allow,deny
|
||||
Deny from all
|
||||
</FilesMatch>
|
||||
|
||||
# Uncomment to restrict access to release text files
|
||||
#<FilesMatch "^(LICENSE|README.md|readme.txt|release-notes.txt)">
|
||||
# Order allow,deny
|
||||
# Deny from all
|
||||
#</FilesMatch>
|
||||
|
||||
|
Reference in New Issue
Block a user