Advertisement
Hubby

.htaccess in project folder

Mar 17th, 2018
82
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.89 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2. <IfModule mod_negotiation.c>
  3. Options -Indexes
  4. </IfModule>
  5.  
  6. RewriteEngine On
  7. RewriteBase /
  8. RewriteRule ^fonts/(.*)$ /public/fonts/$1 [R=301,NC,L]
  9.  
  10. # Redirect Trailing Slashes If Not A Folder...
  11. RewriteCond %{REQUEST_FILENAME} !-d
  12. RewriteRule ^(.*)/$ /$1 [L,R=301]
  13.  
  14. # Handle Front Controller...
  15. RewriteCond %{REQUEST_FILENAME} !-d
  16. RewriteCond %{REQUEST_FILENAME} !-f
  17. RewriteRule ^ index.php [L]
  18.  
  19. # Handle Authorization Header
  20. RewriteCond %{HTTP:Authorization} .
  21. RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
  22. </IfModule>
  23.  
  24. <FilesMatch "(.php$|^\.|^artisan$|^composer.lock$|^composer.json$|^package.json$|^phpunit.xml$|^gulpfile.js$|\.md$)">
  25. Order Allow,Deny
  26. Deny from all
  27. </FilesMatch>
  28.  
  29. <FilesMatch "^index.php$">
  30. Order Allow,Deny
  31. Allow from all
  32. </FilesMatch>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement