Merge pull request #1059 from virtualtam/fix/htaccess-git
htaccess: prevent accessing resources not managed by SCM
This commit is contained in:
commit
8b48e36594
1 changed files with 8 additions and 0 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue