.htaccess 957 B

12345678910111213141516171819202122232425262728293031323334353637
  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. # fixes JWT token not correctly forwarded on some Apache/FastCGI setups
  8. RewriteCond %{HTTP:Authorization} ^(.*)
  9. RewriteRule .* - [e=HTTP_AUTHORIZATION:%1]
  10. # Alternative (if the 2 lines above don't work)
  11. # SetEnvIf Authorization .+ HTTP_AUTHORIZATION=$0
  12. # Slim URL Redirection
  13. # Ionos Hosting needs RewriteBase /
  14. # RewriteBase /
  15. RewriteCond %{REQUEST_FILENAME} !-f
  16. RewriteCond %{REQUEST_FILENAME} !-d
  17. RewriteRule ^ index.php [QSA,L]
  18. <LimitExcept GET POST PUT DELETE PATCH OPTIONS>
  19. <IfModule version_module>
  20. <IfVersion >= 2.4>
  21. Require all denied
  22. </IfVersion>
  23. <IfVersion < 2.4>
  24. Allow from none
  25. Deny from all
  26. </IfVersion>
  27. </IfModule>
  28. <IfModule !version_module>
  29. Require all denied
  30. </IfModule>
  31. </LimitExcept>