Apache开启gzip压缩 for windows

    LoadModule deflate_module modules/mod_deflate.so
    LoadModule headers_module modules/mod_headers.so


<IfModule deflate_module>
    SetOutputFilter DEFLATE
    # Don’t compress images and other
    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|doc)$ no-gzip dont-vary
    AddOutputFilterByType DEFLATE text/html text/plain text/xml text/css
    AddOutputFilterByType DEFLATE application/x-javascript
</IfModule>

猜你喜欢

转载自little-bill.iteye.com/blog/1553263