Facebook
From asaaaa, 1 Month ago, written in Plain Text.
Embed
Download Paste or View Raw
Hits: 162
  1. RewriteEngine On
  2.  
  3. # Slash Redirect
  4. RewriteCond %{REQUEST_URI} !(/$|.)
  5. RewriteRule (.*) %{REQUEST_URI}/ [R=301,L]
  6.  
  7. # MVC Index
  8. RewriteCond %{REQUEST_FILENAME} !-d
  9. RewriteCond %{REQUEST_FILENAME} !-f
  10. RewriteRule ^ index.php [L]
  11.  
  12. # .php files deny
  13. <Files ~ ".php">
  14.   Deny from all
  15. </Files>
  16.  
  17. # index.php allow all users
  18. <Files "index.php">
  19.   Allow from all
  20. </Files>
  21.  
  22. <IfModule mod_headers.c>
  23.     <FilesMatch ".(jpg|JPG|jpeg|png|gif|webp)$">
  24.         Header set Cache-Control "max-age=31536000, public"
  25.     </FilesMatch>
  26.  
  27.     <FilesMatch ".(js|css)$">
  28.         Header set Cache-Control "max-age=31536000"
  29.     </FilesMatch>
  30. </IfModule>
  31.  
  32. Options -Indexes
  33.  
  34. # php -- BEGIN cPanel-generated handler, do not edit
  35. # Set the “ea-php81” package as the default “PHP” programming language.
  36. <IfModule mime_module>
  37.   AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
  38. </IfModule>
  39. # php -- END cPanel-generated handler, do not edit
  40.