Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Header set Strict-Transport-Security "max-age=63072000; includeSubDomains; preload" env=HTTPS
- <IfModule mod_rewrite.c>
- RewriteEngine On
- # Removes index.php from URLs. Doesn't work on subdomains (like localhost/project/)
- RewriteCond %{THE_REQUEST} ^GET.*index\.php [NC]
- RewriteCond %{REQUEST_URI} !/system/.* [NC]
- RewriteRule (.*?)index\.php/*(.*) /$1$2 [R=301,NE,L]
- # Directs all web requests through the site index.php file
- RewriteCond %{REQUEST_FILENAME} !-f
- RewriteCond %{REQUEST_FILENAME} !-d
- RewriteRule ^(.*)$ index.php/$1 [L]
- # Redirect with www -> without www
- RewriteCond %{HTTP_HOST} ^www\.(.*)
- RewriteRule (.*) http://%1/$1 [R=301,L]
- # Redirect with slash / -> without slssh /
- # RewriteRule ^(.*)/$ /$1 [R=301,L]
- </IfModule>
- # mod deflate
- <IfModule mod_deflate.c>
- # komprese
- <FilesMatch "\.(js|css|ttf|svg)$">
- SetOutputFilter DEFLATE
- </FilesMatch>
- # Cache browser
- <FilesMatch ".(css|jpg|jpeg|png|gif|js|ico)$">
- Header set Cache-Control "max-age=2628000, public"
- </FilesMatch>
- </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement