diff options
author | VirtualTam <virtualtam+github@flibidi.net> | 2018-02-05 18:21:59 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-02-05 18:21:59 +0100 |
commit | 8b48e36594394e367cbb33c7ad1a679ea57c374d (patch) | |
tree | 5e0671ed51d327b755cd90de449fd3e9463404bd /.htaccess | |
parent | 91f17fc92a7168e2baf1096910b8f44f3a24a8a2 (diff) | |
parent | cabf1b6becbc0143f6a9d0d6846fd948c06b5a64 (diff) | |
download | Shaarli-8b48e36594394e367cbb33c7ad1a679ea57c374d.tar.gz Shaarli-8b48e36594394e367cbb33c7ad1a679ea57c374d.tar.zst Shaarli-8b48e36594394e367cbb33c7ad1a679ea57c374d.zip |
Merge pull request #1059 from virtualtam/fix/htaccess-git
htaccess: prevent accessing resources not managed by SCM
Diffstat (limited to '.htaccess')
-rw-r--r-- | .htaccess | 8 |
1 files changed, 8 insertions, 0 deletions
@@ -1,4 +1,12 @@ | |||
1 | # Disable directory listing | ||
2 | Options -Indexes | ||
3 | |||
1 | RewriteEngine On | 4 | RewriteEngine On |
5 | |||
6 | # Prevent accessing subdirectories not managed by SCM | ||
7 | RewriteRule ^(.git|doxygen|vendor) - [F] | ||
8 | |||
9 | # REST API | ||
2 | RewriteCond %{REQUEST_FILENAME} !-f | 10 | RewriteCond %{REQUEST_FILENAME} !-f |
3 | RewriteCond %{REQUEST_FILENAME} !-d | 11 | RewriteCond %{REQUEST_FILENAME} !-d |
4 | RewriteRule ^ index.php [QSA,L] | 12 | RewriteRule ^ index.php [QSA,L] |