Advertisement
Guest User

Untitled

a guest
May 27th, 2016
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 2.56 KB | None | 0 0
  1. # MOD_DEFLATE COMPRESSION
  2. SetOutputFilter DEFLATE
  3. AddOutputFilterByType DEFLATE text/html text/css text/plain text/xml application/x-javascript application/x-httpd-php
  4. #Pour les navigateurs incompatibles
  5. BrowserMatch ^Mozilla/4 gzip-only-text/html
  6. BrowserMatch ^Mozilla/4.0[678] no-gzip
  7. BrowserMatch bMSIE !no-gzip !gzip-only-text/html
  8. BrowserMatch bMSI[E] !no-gzip !gzip-only-text/html
  9. #ne pas mettre en cache si ces fichiers le sont déjà
  10. SetEnvIfNoCase Request_URI .(?:gif|jpe?g|png)$ no-gzip
  11. #les proxies doivent donner le bon contenu
  12. Header append Vary User-Agent env=!dont-vary
  13.  
  14. # BEGIN Expire headers
  15. <IfModule mod_expires.c>
  16. ExpiresActive On
  17. ExpiresDefault "access plus 1 year"
  18. ExpiresByType image/jpg "access plus 1 year"
  19. ExpiresByType image/jpeg "access plus 1 year"
  20. ExpiresByType image/png "access plus 1 year"
  21. ExpiresByType image/gif "access plus 1 year"
  22. AddType image/x-icon .ico
  23. ExpiresByType image/ico "access plus 1 year"
  24. ExpiresByType image/icon "access plus 1 year"
  25. ExpiresByType image/x-icon "access plus 1 year"
  26. ExpiresByType text/css "access plus 2592000 seconds"
  27. ExpiresByType text/javascript "access plus 2592000 seconds"
  28. ExpiresByType text/html "access plus 7200 seconds"
  29. ExpiresByType application/xhtml+xml "access plus 7200 seconds"
  30. ExpiresByType application/javascript A259200
  31. ExpiresByType application/x-javascript "access plus 2592000 seconds"
  32. ExpiresByType application/x-shockwave-flash "access plus 2592000 seconds"
  33. # Add a far future Expires header for fonts
  34. AddType application/vnd.ms-fontobject .eot
  35. AddType application/x-font-ttf .ttf
  36. AddType application/x-font-opentype .otf
  37. AddType application/x-font-woff .woff
  38. AddType image/svg+xml .svg
  39. ExpiresByType application/vnd.ms-fontobject "access plus 1 year"
  40. ExpiresByType application/x-font-ttf "access plus 1 year"
  41. ExpiresByType application/x-font-opentype "access plus 1 year"
  42. ExpiresByType application/x-font-woff "access plus 1 year"
  43. ExpiresByType image/svg+xml "access plus 1 year"
  44. </IfModule>
  45. # END Expire headers
  46.  
  47. # BEGIN Cache-Control Headers
  48. <IfModule mod_headers.c>
  49. <FilesMatch "\.(ico|jpe?g|png|gif|swf|gz|ttf)$">
  50. Header set Cache-Control "max-age=2592000, public"
  51. </FilesMatch>
  52. <FilesMatch "\.(css)$">
  53. Header set Cache-Control "max-age=2592000, public"
  54. </FilesMatch>
  55. <FilesMatch "\.(js)$">
  56. Header set Cache-Control "max-age=2592000, private"
  57. </FilesMatch>
  58. <filesMatch "\.(html|htm)$">
  59. Header set Cache-Control "max-age=7200, public"
  60. </filesMatch>
  61. # Disable caching for scripts and other dynamic files
  62. <FilesMatch ".(pl|php|cgi|spl|scgi|fcgi)$">
  63. Header unset Cache-Control
  64. </FilesMatch>
  65. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement