Gzip compression not working over HTTPS
I have enabled gzip compression for my website via the following in my .htaccess:
AddOutputFilterByType DEFLATE text/plain
AddOutputFilterByType DEFLATE text/html
AddOutput开发者_如何转开发FilterByType DEFLATE text/css
AddOutputFilterByType DEFLATE text/xml
AddOutputFilterByType DEFLATE application/javascript
AddOutputFilterByType DEFLATE application/x-javascript
AddOutputFilterByType DEFLATE application/xml
This works fine and content is compressed for unencrypted connections, however when secure requests are made nothing is compressed. Any ideas?
My server is running Apache/2.2.14
In your Apache configuration for your secure site (ie the bit where it talks about port 443 and SSL) check that you have enabled the use of .htaccess files with an AllowOverride directive.
It's possible your current AllowOverride directive is within a section pertaining only to the configuration of non-secure, port 80 access to your server.
You should probably RTFM deflation should be negotiated automatically by the server and client at the SSL layer, not the HTTP layer.
C
精彩评论