Advertisement
Guest User

Untitled

a guest
Jun 27th, 2019
109
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.06 KB | None | 0 0
  1. Header set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" env=HTTPS
  2.  
  3. <IfModule mod_rewrite.c>
  4. RewriteEngine On
  5.  
  6. # Removes index.php from URLs. Doesn't work on subdomains (like localhost/project/)
  7. RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
  8. RewriteCond %{REQUEST_URI} !/system/.* [NC]
  9. RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
  10.  
  11. # Directs all web requests through the site index.php file
  12. RewriteCond %{REQUEST_FILENAME} !-f
  13. RewriteCond %{REQUEST_FILENAME} !-d
  14. RewriteRule ^(.*)$ index.php/$1 [L]
  15.  
  16. # Redirect with www -> without www
  17. RewriteCond %{HTTP_HOST} ^www\.(.*)
  18. RewriteRule (.*) http://%1/$1 [R=301,L]
  19.  
  20. # Redirect with slash / -> without slssh /
  21. # RewriteRule ^(.*)/$ /$1 [R=301,L]
  22.  
  23.  
  24. </IfModule>
  25.  
  26. # mod deflate
  27. <IfModule mod_deflate.c>
  28. # komprese
  29. <FilesMatch "\.(js|css|ttf|svg)$">
  30. SetOutputFilter DEFLATE
  31. </FilesMatch>
  32.  
  33. # Cache browser
  34. <FilesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
  35. Header set Cache-Control "max-age=2628000, public"
  36. </FilesMatch>
  37. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement