]> git.immae.eu Git - github/shaarli/Shaarli.git/blobdiff - .htaccess
htaccess: prevent accessing resources not managed by SCM
[github/shaarli/Shaarli.git] / .htaccess
index 66ef8f69ce39e127dc266c9ab3727c4b8be4f9fa..19dd72a805e7b3bd170c87aabb25ad4764ca179a 100644 (file)
--- a/.htaccess
+++ b/.htaccess
@@ -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]