Advertisement
Guest User

Untitled

a guest
Sep 22nd, 2019
115
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.82 KB | None | 0 0
  1. <IfModule mod_rewrite.c>
  2.  
  3. <IfModule mod_negotiation.c>
  4. Options -MultiViews
  5. </IfModule>
  6.  
  7. RewriteEngine On
  8.  
  9. ##
  10. ## You may need to uncomment the following line for some hosting environments,
  11. ## if you have installed to a subdirectory, enter the name here also.
  12. ##
  13. # RewriteBase /
  14.  
  15. ##
  16. ## Uncomment following lines to force HTTPS.
  17. ##
  18. RewriteCond %{HTTPS} off
  19. RewriteRule (.*) https://%{SERVER_NAME}/$1 [R,L]
  20.  
  21. ##
  22. ## Black listed folders
  23. ##
  24. RewriteRule ^bootstrap/.* index.php [L,NC]
  25. RewriteRule ^config/.* index.php [L,NC]
  26. RewriteRule ^vendor/.* index.php [L,NC]
  27. RewriteRule ^storage/cms/.* index.php [L,NC]
  28. RewriteRule ^storage/logs/.* index.php [L,NC]
  29. RewriteRule ^storage/framework/.* index.php [L,NC]
  30. RewriteRule ^storage/temp/protected/.* index.php [L,NC]
  31. RewriteRule ^storage/app/uploads/protected/.* index.php [L,NC]
  32.  
  33. ##
  34. ## White listed folders
  35. ##
  36. RewriteCond %{REQUEST_FILENAME} -f
  37. RewriteCond %{REQUEST_FILENAME} !/.well-known/*
  38. RewriteCond %{REQUEST_FILENAME} !/storage/app/uploads/.*
  39. RewriteCond %{REQUEST_FILENAME} !/storage/app/media/.*
  40. RewriteCond %{REQUEST_FILENAME} !/storage/temp/public/.*
  41. RewriteCond %{REQUEST_FILENAME} !/themes/.*/(assets|resources)/.*
  42. RewriteCond %{REQUEST_FILENAME} !/plugins/.*/(assets|resources)/.*
  43. RewriteCond %{REQUEST_FILENAME} !/modules/.*/(assets|resources)/.*
  44. RewriteRule !^index.php index.php [L,NC]
  45.  
  46. ##
  47. ## Block all PHP files, except index
  48. ##
  49. RewriteCond %{REQUEST_FILENAME} -f
  50. RewriteCond %{REQUEST_FILENAME} \.php$
  51. RewriteRule !^index.php index.php [L,NC]
  52.  
  53. ##
  54. ## Standard routes
  55. ##
  56. RewriteCond %{REQUEST_FILENAME} !-f
  57. RewriteRule ^ index.php [L]
  58.  
  59. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement