Merge pull request #1059 from virtualtam/fix/htaccess-git

htaccess: prevent accessing resources not managed by SCM
This commit is contained in:
VirtualTam 2018-02-05 18:21:59 +01:00 committed by GitHub
commit 8b48e36594
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 8 additions and 0 deletions

View File

@ -1,4 +1,12 @@
# Disable directory listing
Options -Indexes
RewriteEngine On
# Prevent accessing subdirectories not managed by SCM
RewriteRule ^(.git|doxygen|vendor) - [F]
# REST API
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^ index.php [QSA,L]