Advertisement
Guest User

Untitled

a guest
Aug 31st, 2016
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.54 KB | None | 0 0
  1. # Gzip compression
  2. <IfModule mod_deflate.c>
  3. # Active compression
  4. SetOutputFilter DEFLATE
  5. # Force deflate for mangled headers
  6. <IfModule mod_setenvif.c>
  7. <IfModule mod_headers.c>
  8. SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
  9. RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
  10. # Don’t compress images and other uncompressible content
  11. SetEnvIfNoCase Request_URI \
  12. \.(?:gif|jpe?g|png|rar|zip|exe|flv|mov|wma|mp3|avi|swf|mp?g)$ no-gzip dont-vary
  13. </IfModule>
  14. </IfModule>
  15.  
  16.  
  17. # Compress all output labeled with one of the following MIME-types
  18. <IfModule mod_filter.c>
  19. AddOutputFilterByType DEFLATE application/atom+xml \
  20. application/javascript \
  21. application/json \
  22. application/rss+xml \
  23. application/vnd.ms-fontobject \
  24. application/x-font-ttf \
  25. application/xhtml+xml \
  26. application/xml \
  27. font/opentype \
  28. image/svg+xml \
  29. image/x-icon \
  30. text/css \
  31. text/html \
  32. text/plain \
  33. text/x-component \
  34. text/xml
  35. </IfModule>
  36. <IfModule mod_headers.c>
  37. Header append Vary: Accept-Encoding
  38. </IfModule>
  39. </IfModule>
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement