Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- Options +FollowSymLinks
- <ifModule mod_expires.c>
- ExpiresActive On
- ExpiresDefault "access plus 5 seconds"
- ExpiresByType text/html "access plus 10 seconds"
- ExpiresByType image/jpg "access 1 month"
- ExpiresByType image/gif "access 1 month"
- ExpiresByType image/jpeg "access 1 month"
- ExpiresByType image/png "access 1 month"
- ExpiresByType text/css "access 1 month"
- ExpiresByType application/x-javascript "access plus 1 month"
- ExpiresByType text/javascript "access plus 1 month"
- ExpiresByType application/javascript "access plus 2 week"
- ExpiresByType image/x-icon "access plus 2 month"
- ExpiresByType image/icon "access plus 2 month"
- ExpiresByType application/x-ico "access plus 2 month"
- ExpiresByType application/ico "access plus 2 month"
- ExpiresByType application/font-woff "access plus 1 month"
- ExpiresByType image/svg+xml "access plus 1 month"
- </ifModule>
- # Allows only https
- RewriteCond %{SERVER_PORT} !^443$
- RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
- # Add www to any URLs that do not have them:
- RewriteCond %{HTTP_HOST} !^www\.
- RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
- # Remove /web/ from url
- RewriteEngine on
- RewriteRule ^(.+)?$ /web/$1
- # Remove suffix from sitemap.xml
- RewriteEngine on
- RewriteRule /sitemap.xml/ /sitemap.xml [L]
- # Force trailing slash
- RewriteCond %{REQUEST_URI} /+[^\.]+$
- RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
Advertisement
Add Comment
Please, Sign In to add comment