podium84

Registered
Jul 23, 2018
2
0
1
Ibiza-spain
cPanel Access Level
Website Owner
Hi everybody!

The HTMLS files from my website can not be compressed, JAva and CSS yes.
From the server side they told me compression is enable. In OPtimize Web is active and I have "
zlib.output_compression = On"

I need some help because I´m geting crazy reading in the forums, talking with technical support of Hummingbird plugin fro WP and also with the hosting service.

What is happening??
Many thanks in advance for help with this.



Alfredo
 

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello Alfredo,

Can you run the following command for an HTML page on the domain name and let us know the output?

Code:
curl -v --compressed http://domain.tld/test.html
Ensure to use CODE tags and replace real domain names and IP addresses with examples when pasting the output in your response.

Additionally, can you let us know the contents of your .htaccess file within the document root of the HTML files you are attempting to serve as compressed?

Thank you.
 

podium84

Registered
Jul 23, 2018
2
0
1
Ibiza-spain
cPanel Access Level
Website Owner
Can you run the following command for an HTML page on the domain name and let us know the output?

Code:
curl -v --compressed http://domain.tld/test.html
Ensure to use CODE tags and replace real domain names and IP addresses with examples when pasting the output in your response.
Hi, I don´t know how to run a command in an HTML page... :( how can i do it, can u help please?
THANKS!

Htaccess content:
Code:
# BEGIN rlrssslReallySimpleSSL rsssl_version[3.0.2]
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{HTTPS} !=on [NC]
RewriteRule ^(.*)$ https://%{HTTP_HOST}/$1 [R=301,L]
</IfModule>
# END rlrssslReallySimpleSSL
# BEGIN WordPress
<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>
# END WordPress



<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>
# BEGIN WP-HUMMINGBIRD-GZIP

<IfModule mod_deflate.c>
    SetOutputFilter DEFLATE
    <IfModule mod_setenvif.c>
        <IfModule mod_headers.c>
            SetEnvIfNoCase ^(Accept-EncodXng|X-cept-Encoding|X{15}|~{15}|-{15})$ ^((gzip|deflate)\s*,?\s*)+|[X~-]{4,13}$ HAVE_Accept-Encoding
            RequestHeader append Accept-Encoding "gzip,deflate" env=HAVE_Accept-Encoding
        </IfModule>
    </IfModule>
    <IfModule mod_filter.c>
        AddOutputFilterByType DEFLATE "application/atom+xml" \
                                      "application/javascript" \
                                      "application/json" \
                                      "application/ld+json" \
                                      "application/manifest+json" \
                                      "application/rdf+xml" \
                                      "application/rss+xml" \
                                      "application/schema+json" \
                                      "application/vnd.geo+json" \
                                      "application/vnd.ms-fontobject" \
                                      "application/x-font-ttf" \
                                      "application/x-font-opentype" \
                                      "application/x-font-truetype" \
                                      "application/x-javascript" \
                                      "application/x-web-app-manifest+json" \
                                      "application/xhtml+xml" \
                                      "application/xml" \
                                      "font/eot" \
                                      "font/opentype" \
                                      "font/otf" \
                                      "image/bmp" \
                                      "image/svg+xml" \
                                      "image/vnd.microsoft.icon" \
                                      "image/x-icon" \
                                      "text/cache-manifest" \
                                      "text/css" \
                                      "text/html" \
                                      "text/javascript" \
                                      "text/plain" \
                                      "text/vcard" \
                                      "text/vnd.rim.location.xloc" \
                                      "text/vtt" \
                                      "text/x-component" \
                                      "text/x-cross-domain-policy" \
                                      "text/xml"

    </IfModule>
    <IfModule mod_mime.c>
        AddEncoding gzip              svgz
    </IfModule>

</IfModule>
# END WP-HUMMINGBIRD-GZIP
 
Last edited by a moderator:

cPanelMichael

Administrator
Staff member
Apr 11, 2011
47,880
2,267
463
Hello,

You can run that command via SSH (if it's enabled on your account):

SSH Access - Version 72 Documentation - cPanel Documentation

As far as your .htaccess rules, you may want to try temporarily removing the custom mod_rewrite rules to rule them out as the cause of the issue. If the content is compressed after removing the custom mod_rewrite rules, then you'd want to check with the script developer to see how you might adjust those rules to ensure compression still works.

Thank you.