• Hi,
    When we add these lines to our .htaccess the gzip appears disble on the online tools but when we remove it the gzip turn enable again… why?????

    These are the code lines:

    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteCond %{HTTPS} =on
    RewriteRule .* – [E=W3TC_SSL:_ssl]
    RewriteCond %{SERVER_PORT} =443
    RewriteRule .* – [E=W3TC_SSL:_ssl]
    RewriteCond %{HTTP:X-Forwarded-Proto} =https [NC]
    RewriteRule .* – [E=W3TC_SSL:_ssl]
    RewriteCond %{HTTP:Accept-Encoding} gzip
    RewriteRule .* – [E=W3TC_ENC:_gzip]
    RewriteCond %{HTTP_COOKIE} w3tc_preview [NC]
    RewriteRule .* – [E=W3TC_PREVIEW:_preview]
    RewriteCond %{REQUEST_METHOD} !=POST
    RewriteCond %{QUERY_STRING} =””
    RewriteCond %{REQUEST_URI} \/$
    RewriteCond %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond “%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” -f
    RewriteRule .* “/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” [L]
    </IfModule>
    # END W3TC Page Cache core

    The page I need help with: [log in to see the link]

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello nacxo,

    The issue you are having might be caused by the sequence of the rules that appear in .htaccess, make sure WordPress’s rule appears AFTER the w3tc rule.

    Also, there is a possibility that existing .htaccess file has been compromised by mistake. Create a new “.htaccess” and let WordPress and W3tc plugin to write the rules again.

    Hopefully this will resolve your issue.

    bgdstr

    (@bogdanstratulat)

    Can we please have an update regarding this issue?
    Is everything working as expected? If so, please feel free to close and mark this topic as resolved.
    If you have any other questions, please feel free to ask.

    Thank you for using W3 Total Cache.
    Kind regards!
    Bogdan S.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘Conflic between Page cache & GZIP compression’ is closed to new replies.