• Resolved boylensupport

    (@boylensupport)


    Hi There,

    We have a Runcloud NGINX + Apache2 Hybrid (You will be able to use .htaccess) configuration.

    I am retrieving the following message when I enable page cache (disk: enhanced)

    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 https://www.centennialpark.org/w3tc_rewrite_test into https://www.centennialpark.org/?w3tc_rewrite_test which, if handled by plugin, return "OK" message.
    The plugin made a request to https://www.centennialpark.org/w3tc_rewrite_test but received:
    200 OK
    instead of "OK" response.

    I’ve confirmed permissions are correct and the plugin can access and modify the .htaccess files as per the install page.

    I’ve also restarted NGINX without resolve.

    Please help.

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

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

    (@vmarko)

    Hello @boylensupport

    I am sorry about the issue you are experiencing and I am happy to assist you with this.
    Just to confirm, you’ve checked that the rewrite rules in the Performance>Install are the same as in your .htaccess file?
    Have you also checked if the permissions are correct and the rules are there for /wp-content/cache/page_enhanced/.htaccess?
    Can you also please confirm that the default WP rules are below the W3TC rules for example:

    # END W3TC Browser Cache
     # 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

    Thanks!

    Thread Starter boylensupport

    (@boylensupport)

    Hi there,

    Yes, I’ve confirmed all of the above.

    Both .htaccess files have the following permissions:
    -rw-r–r–+

    Thank you.

    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @boylensupport

    Thank you for the information.
    Please check the content of the wp-content/cache/page_enhanced/ folder. If you see that the pages are being cached there, you can ignore the error. In some cases, the plugin cannot detect if the rewrite rules work because of server restrictions or something like that. The server cannot get a correct response (200 OK) when visiting a certain URL. That doesn’t mean they don’t work, but you have to verify it yourself.
    Thanks!

    Thread Starter boylensupport

    (@boylensupport)

    Thank you- we do have files in the wp-content/cache/page_enhanced/ folder

    I have debug mode on, and this is the page I want cached.

    Can you confirm this means the page is caching?

    view-source:https://www.centennialpark.org/events/remembrance-day-2021/

    Thank you

    <!--
    Performance optimized by W3 Total Cache. Learn more: https://www.boldgrid.com/w3-total-cache/
    
    Page Caching using disk: enhanced{w3tc_pagecache_reject_reason}
    
    Page cache debug info:
    Engine:             disk: enhanced
    Cache key:          
    Creation Time:      1635472244.000s
    Header info:
    Pragma:             no-cache
    Expires:            Wed, 11 Jan 1984 05:00:00 GMT
    Cache-Control:      no-cache, must-revalidate, max-age=0
    Content-Type:       text/html; charset=UTF-8
    Link:               <https://www.centennialpark.org/wp-json/>; rel="https://api.w.org/"
    Link:               <https://www.centennialpark.org/wp-json/wp/v2/bn_event/286950>; rel="alternate"; type="application/json"
    Link:               <https://www.centennialpark.org/?p=286950>; rel=shortlink
    
    Served from: www.centennialpark.org @ 2021-10-29 12:20:44 by W3 Total Cache
    Plugin Contributor Marko Vasiljevic

    (@vmarko)

    Hello @boylensupport

    Yes, I can confirm that the pages are cached.
    The {w3tc_pagecache_reject_reason} means that you are logged in.
    I can see also that you do not have the option Cache SSL (HTTPS) requests enabled in Performance>Page Cache.
    Thanks!

Viewing 5 replies - 1 through 5 (of 5 total)
  • The topic ‘W3 Total Cache error – Page Cache URL rewriting is not working’ is closed to new replies.