• I’ve recently installed the plugin, and it’s automatically added rewrite rules to my htaccess. However I’m getting this message:

    W3 Total Cache error: It appears Page Cache URL rewriting is not working. Please verify that the server configuration allows .htaccess
    Unfortunately disk enhanced page caching will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.
    Technical info
    .htaccess file contains rules to rewrite url http://www.littlewhitelies.co.uk/w3tc_rewrite_test into http://www.littlewhitelies.co.uk/?w3tc_rewrite_test which, if handled by plugin, return “OK” message.
    The plugin made a request to http://www.littlewhitelies.co.uk/w3tc_rewrite_test but received:
    404 Not Found
    instead of “OK” response.

    Here’s the contents of my .htaccess:

    # BEGIN W3TC Browser Cache
    <IfModule mod_deflate.c>
    <IfModule mod_headers.c>
    Header append Vary User-Agent env=!dont-vary
    </IfModule>
    AddOutputFilterByType DEFLATE text/css text/x-component application/x-javascript application/javascript text/javascript text/x-js text/html text/richtext image/svg+xml text/plain text/xsd text/xsl text/xml image/x-icon application/json
    <IfModule mod_mime.c>
    # DEFLATE by extension
    AddOutputFilter DEFLATE js css htm html xml
    </IfModule>
    </IfModule>
    # END W3TC Browser Cache
    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteBase /
    RewriteRule ^(.*\/)?w3tc_rewrite_test/?$ $1?w3tc_rewrite_test=1 [L]
    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 %{HTTP_COOKIE} !(comment_author|wp\-postpass|w3tc_logged_out|wordpress_logged_in|wptouch_switch_toggle) [NC]
    RewriteCond “%{DOCUMENT_ROOT}/edit/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” -f
    RewriteRule .* “/edit/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}” [L]
    </IfModule>
    # END W3TC Page Cache core
    # 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

    Anyone know what might be wrong?

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

Viewing 5 replies - 1 through 5 (of 5 total)
  • I have the same problem.

    W3 Total Cache error:It appears Minify URL rewriting is not working. Please verify that the server configuration allows .htaccess
    Unfortunately minification will not function without custom rewrite rules. Please ask your server administrator for assistance. Also refer to the install page for the rules for your server.
    Technical info
    .htaccess file contains rules to rewrite url http://www.mysite.it/wp-content/cache/minify/000000/w3tc_rewrite_test. If handled by plugin, it returns "OK" message.
    The plugin made a request to http://www.mysite.it/wp-content/cache/minify/000000/w3tc_rewrite_test but received:
    503 Service Unavailable
    instead of "OK" response.

    This is my .htaccess file

    # BEGIN W3TC Page Cache core
    <IfModule mod_rewrite.c>
        RewriteEngine On
        RewriteBase /
        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_PREVIEW}.html%{ENV:W3TC_ENC}" -f
        RewriteRule .* "/wp-content/cache/page_enhanced/%{HTTP_HOST}/%{REQUEST_URI}/_index%{ENV:W3TC_PREVIEW}.html%{ENV:W3TC_ENC}" [L]
    </IfModule>
    # END W3TC Page Cache core
    # 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

    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.

    I tried renaming files .htaccess, _index.html and _index.html_gzip

    at public_html/wp-content/cache/page_enhanced/www.mysite.com

    but it breaks my website. I reuploaded my backup still breaks my site.

    How do I fix this? I had to deactivate W3 Total Cache plugin for my site to work.

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

The topic ‘Rewrite rules not working for enhanced disk cache’ is closed to new replies.