• Hi guys,

    The issue I have is that when using ‘Disc: Enhanced’ mode Google (Google Page Speed Insight and Webmaster tools) see my site as 403 Forbidden! Yet, I can access the URL just fine…

    Anyway, looking at .htaccess I notice the following:

    RewriteCond "%{DOCUMENT_ROOT}/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_SSL}%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" -f

    As I understand it -f is forbidden, right?

    Here’s the complete Page Cache Core entries from my .htaccess:

    # 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: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) [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

    Any ideas how I can resolve this please and why W3 Total Cache is entering in a -f is this right?

    Thanks in advance
    Rob.

    https://wordpress.org/plugins/w3-total-cache/

Viewing 2 replies - 1 through 2 (of 2 total)
  • I have the W3 installed in 5 websites. In one of them, the site works fine from any browser, but when I’m trying to access it through a “page loading test” site (e.x. pingdom.com, websiteoptimization.com, uptimerobot.com) the site always reports Forbidden 403 error! When I change on “Page Cache Method” from “Disk: Enhanced” to “Disk: Basic” the 403 Error stopped showing up. Any idea to enable “Disk: Enhanced” and stop with the Forbidden 403 Error?

    Just an update to help someone having the same issue… I’ve fixed the problem following the steps below 🙂

    In public_html/wp-content/cache/page_enhanced/www.mysite.com there were 2 files, _index.html.old and _index.html_gzip.old. There was also a public_html/wp-content/cache/page_enhanced/www.mysite.com/.htaccess folder and inside it there were 2 files, _index.html and _index.html_gzip.

    So I renamed .htaccess folder to .htaccess_old and also the files inside to _index.html.old and _index.html_gzip.old.

    Then I renamed the _index.html.old and _index.html_gzip.old from inside public_html/wp-content/cache/page_enhanced/www.mysite.com to _index.html and _index.html_gzip.

    So the problem was fixed and I was able to enable page cache disk enhanced mode.

Viewing 2 replies - 1 through 2 (of 2 total)

The topic ‘Disc Enhanced Causing 403 Forbidden – HELP!’ is closed to new replies.