.htaccess 401 B

12345678910111213141516
  1. # Disable directory listing
  2. Options -Indexes
  3. RewriteEngine On
  4. # Prevent accessing subdirectories not managed by SCM
  5. RewriteRule ^(.git|doxygen|vendor) - [F]
  6. # Forward the "Authorization" HTTP header
  7. RewriteCond %{HTTP:Authorization} ^(.*)
  8. RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
  9. # REST API
  10. RewriteCond %{REQUEST_FILENAME} !-f
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteRule ^ index.php [QSA,L]