Guest User

Untitled

a guest
Apr 2nd, 2018
364
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.40 KB | None | 0 0
  1. Options +FollowSymLinks
  2.  
  3. <ifModule mod_expires.c>
  4. ExpiresActive On
  5. ExpiresDefault "access plus 5 seconds"
  6. ExpiresByType text/html "access plus 10 seconds"
  7. ExpiresByType image/jpg "access 1 month"
  8. ExpiresByType image/gif "access 1 month"
  9. ExpiresByType image/jpeg "access 1 month"
  10. ExpiresByType image/png "access 1 month"
  11. ExpiresByType text/css "access 1 month"
  12. ExpiresByType application/x-javascript "access plus 1 month"
  13. ExpiresByType text/javascript "access plus 1 month"
  14. ExpiresByType application/javascript "access plus 2 week"
  15. ExpiresByType image/x-icon "access plus 2 month"
  16. ExpiresByType image/icon "access plus 2 month"
  17. ExpiresByType application/x-ico "access plus 2 month"
  18. ExpiresByType application/ico "access plus 2 month"
  19. ExpiresByType application/font-woff "access plus 1 month"
  20. ExpiresByType image/svg+xml "access plus 1 month"
  21. </ifModule>
  22.  
  23. # Allows only https
  24. RewriteCond %{SERVER_PORT} !^443$
  25. RewriteRule .* https://%{SERVER_NAME}%{REQUEST_URI} [R=301,L]
  26.  
  27. # Add www to any URLs that do not have them:
  28. RewriteCond %{HTTP_HOST} !^www\.
  29. RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
  30.  
  31. # Remove /web/ from url
  32. RewriteEngine on
  33. RewriteRule ^(.+)?$ /web/$1
  34.  
  35. # Remove suffix from sitemap.xml
  36. RewriteEngine on
  37. RewriteRule /sitemap.xml/ /sitemap.xml [L]
  38.  
  39. # Force trailing slash
  40. RewriteCond %{REQUEST_URI} /+[^\.]+$
  41. RewriteRule ^(.+[^/])$ %{REQUEST_URI}/ [R=301,L]
Advertisement
Add Comment
Please, Sign In to add comment