SHARE
TWEET

Untitled

a guest Feb 27th, 2020 82 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. RewriteEngine On
  2. RewriteBase /
  3. RewriteCond %{REQUEST_FILENAME} !-f
  4. RewriteCond %{REQUEST_FILENAME} !-d
  5. RewriteRule . /index.html [QSA,L]
  6.  
  7. <ifModule mod_gzip.c>
  8. mod_gzip_on Yes
  9. mod_gzip_dechunk Yes
  10. mod_gzip_item_include file .(html?|txt|css|js|php|pl)$
  11. mod_gzip_item_include handler ^cgi-script$
  12. mod_gzip_item_include mime ^text/.*
  13. mod_gzip_item_include mime ^application/x-javascript.*
  14. mod_gzip_item_exclude mime ^image/.*
  15. mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.*
  16. </ifModule>
  17.  
  18. ##Tweaks##
  19. Header set X-Frame-Options SAMEORIGIN
  20.  
  21. ## EXPIRES CACHING ##
  22. <IfModule mod_expires.c>
  23. ExpiresActive On
  24. ExpiresByType image/jpg "access 1 year"
  25. ExpiresByType image/jpeg "access 1 year"
  26. ExpiresByType image/gif "access 1 year"
  27. ExpiresByType image/png "access 1 year"
  28. ExpiresByType text/css "access 1 month"
  29. ExpiresByType text/html "access 1 month"
  30. ExpiresByType application/pdf "access 1 month"
  31. ExpiresByType text/x-javascript "access 1 month"
  32. ExpiresByType application/x-shockwave-flash "access 1 month"
  33. ExpiresByType image/x-icon "access 1 year"
  34. ExpiresDefault "access 1 month"
  35. </IfModule>
  36. ## EXPIRES CACHING ##
  37.  
  38. <IfModule mod_headers.c>
  39.     Header set Connection keep-alive
  40.     <filesmatch "\.(ico|flv|gif|swf|eot|woff|otf|ttf|svg)$">
  41.         Header set Cache-Control "max-age=2592000, public"
  42.     </filesmatch>
  43.     <filesmatch "\.(jpg|jpeg|png)$">
  44.         Header set Cache-Control "max-age=1209600, public"
  45.     </filesmatch>
  46.     # css and js should use private for proxy caching https://developers.google.com/speed/docs/best-practices/caching#LeverageProxyCaching
  47.     <filesmatch "\.(css)$">
  48.         Header set Cache-Control "max-age=31536000, private"
  49.     </filesmatch>
  50.     <filesmatch "\.(js)$">
  51.         Header set Cache-Control "max-age=1209600, private"
  52.     </filesmatch>
  53.     <filesMatch "\.(x?html?|php)$">
  54.         Header set Cache-Control "max-age=600, private, must-revalidate"
  55.       </filesMatch>
  56. </IfModule>
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Top