apache mod_expires mod_deflate

2009-05-13 15:57:59来源:未知 阅读 ()

新老客户大回馈,云服务器低至5折

        SetOutputFilter DEFLATE
        AddOutputFilter DEFLATE xml php js css
        BrowserMatch ^Mozilla/4 gzip-only-text/html
        BrowserMatch ^Mozilla/4\.0[678] no-gzip
        BrowserMatch \bMSIE !no-gzip !gzip-only-text/html
        # Don't compress images
        SetEnvIfNoCase Request_URI \
        \.(?:gif|jpe?g|png)$ no-gzip dont-vary
        SetEnvIfNoCase Request_URI \
        \.(?:exe|t?gz|zip|bz2|sit|rar)$ no-gzip dont-vary
        SetEnvIfNoCase Request_URI \
        \.pdf$ no-gzip dont-vary
        SetEnvIfNoCase Request_URI \
        \.(css|js)$ no-gzip dont-vary
        # Make sure proxies don't deliver the wrong content
        Header append Vary User-Agent env=!dont-vary
        DeflateFilterNote Input input_info
        DeflateFilterNote Output output_info
        DeflateFilterNote Ratio ratio_info
        LogFormat '"%r" %{output_info}n/%{input_info}n (%{ratio_info}n%%)' deflate
        CustomLog logs/deflate_log.log deflate
ExpiresActive On
ExpiresDefault "access plus 4 hours"
ExpiresByType application/javascript "access plus 1 week"
ExpiresByType application/x-javascript "access plus 1 week"
ExpiresByType text/javascript "access plus 1 week"
ExpiresByType text/css "access plus 1 day"
ExpiresByType text/html A900
ExpiresByType text/xml A14400
ExpiresByType text/plain "access plus 1 hours"
ExpiresByType image/gif "access plus 1 day"
ExpiresByType image/jpg "access plus 1 day"
ExpiresByType image/jpeg "access plus 1 day"
ExpiresByType image/png "access plus 1 day"
ExpiresByType image/bmp "access plus 1 day"
ExpiresByType application/x-shockwave-flash A3600


本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u1/57953/showart_1778986.html

标签:

版权申明:本站文章部分自网络,如有侵权,请联系:west999com@outlook.com
特别注意:本站所有转载文章言论不代表本站观点,本站所提供的摄影照片,插画,设计作品,如需使用,请与原作者联系,版权归原作者所有

上一篇:FreeBSD下moodle的安装小记

下一篇:mysql 迁移备份