.htaccess 1.3 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. <IfModule mod_rewrite.c>
  2. <IfModule mod_negotiation.c>
  3. Options -MultiViews -Indexes
  4. </IfModule>
  5. RewriteEngine On
  6. # Handle Authorization Header
  7. RewriteCond %{HTTP:Authorization} .
  8. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  9. # Redirect Trailing Slashes If Not A Folder...
  10. RewriteCond %{REQUEST_FILENAME} !-d
  11. RewriteCond %{REQUEST_URI} (.+)/$
  12. RewriteRule ^ %1 [L,R=301]
  13. # Handle Front Controller...
  14. RewriteCond %{REQUEST_FILENAME} !-d
  15. RewriteCond %{REQUEST_FILENAME} !-f
  16. RewriteRule ^ index.php [L]
  17. </IfModule>
  18. # Disable index view
  19. Options -Indexes
  20. # Hide a specific file
  21. <Files ~ "\.(env|json|config.js|md|gitignore|gitattributes|lock)$">
  22. Order allow,deny
  23. Deny from all
  24. </Files>
  25. ## EXPIRES CACHING ##
  26. <IfModule mod_expires.c>
  27. ExpiresActive On
  28. ExpiresByType image/jpg "access plus 1 year"
  29. ExpiresByType image/jpeg "access plus 1 year"
  30. ExpiresByType image/gif "access plus 1 year"
  31. ExpiresByType image/png "access plus 1 year"
  32. ExpiresByType text/css "access plus 1 month"
  33. ExpiresByType text/x-javascript "access plus 1 month"
  34. ExpiresByType application/x-shockwave-flash "access plus 1 month"
  35. ExpiresByType image/x-icon "access plus 1 year"
  36. ExpiresDefault "access plus 1 days"
  37. </IfModule>