Last active
August 27, 2016 18:31
-
-
Save phpdave/2376748d201d163aca3f5166db97bf34 to your computer and use it in GitHub Desktop.
enable gzip compression. Doesn't work on windstream. Also plugin "GZip Ninja Speed Compression" didn;t work
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#enable compression | |
#Compression Attempt 1 | |
AddOutputFilterByType DEFLATE text/html | |
AddOutputFilterByType DEFLATE text/css | |
AddOutputFilterByType DEFLATE application/javascript | |
<IfModule deflate_module> | |
# Enable compression for the following file types. | |
AddOutputFilterByType \ | |
DEFLATE \ | |
application/javascript \ | |
text/css \ | |
text/html \ | |
text/javascript \ | |
text/plain \ | |
text/xml | |
</IfModule> | |
#Attempt 3 | |
SetOutputFilter DEFLATE | |
SetEnvIfNoCase Request_URI "\.(?:gif|jpe?g|png)$" no-gzip | |
#Attempt 4 | |
<IfModule mod_deflate.c> | |
AddOutputFilterByType DEFLATE text/text text/html text/plain text/xml text/css application/x-javascript application/javascript | |
</IfModule> | |
#Compression Attempt 2 | |
<ifModule mod_gzip.c> | |
mod_gzip_on Yes | |
mod_gzip_dechunk Yes | |
mod_gzip_item_include file .(html?|txt|css|js|php|pl)$ | |
mod_gzip_item_include handler ^cgi-script$ | |
mod_gzip_item_include mime ^text/.* | |
mod_gzip_item_include mime ^application/x-javascript.* | |
mod_gzip_item_exclude mime ^image/.* | |
mod_gzip_item_exclude rspheader ^Content-Encoding:.*gzip.* | |
</ifModule> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment