You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
With the Apache-rewrite rules provided by the plugins Setup tab POST request to / receive a (hdd) cached answer.
I'm not entirely sure what exactly goes wrong but it seems that after the final WordPress rule RewriteRule . /index.php [L] is applied, all the rewrite rules are checked again (which apparently is how apache works. did not know that before). inside the subrequest the REQUEST_METHOD seems not to match the initial one which leads to a cached response being delivered for a POST request to /
line 1: is the final WordPress rule RewriteRule . /index.php [L]
which results in a subrequest (lines 2 and 3)
line 4 is the first cachify rule RewriteRule .* - [E=CACHIFY_HOST:https-%{HTTP_HOST}] this time applied to the subrequest to index.php
line 5 shows that for the subrequest the method is GET
6 & 7 are the cachify conditions
RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content/cache)/.*
RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
and in line 8 it gets rewritten to the cached path
I "fixed" it by prepending RewriteCond %{REQUEST_URI} /$ to the Main Rules block which makes the whole "set subdirectory" block useless. I'm not sure under which circumstances the condition RewriteCond %{REQUEST_URI} ^$ is true so im not sure if my "fix" breaks other setups.
The text was updated successfully, but these errors were encountered:
I guess I stumbled upon the same problem with BC Cache (fork of Cachify). My solution was to add NS flag to the RewriteRule, see: chesio/bc-cache#6 It should work with Cachify as well.
timse201
added a commit
to timse201/cachify
that referenced
this issue
Mar 26, 2021
With the Apache-rewrite rules provided by the plugins Setup tab POST request to / receive a (hdd) cached answer.
I'm not entirely sure what exactly goes wrong but it seems that after the final WordPress rule RewriteRule . /index.php [L] is applied, all the rewrite rules are checked again (which apparently is how apache works. did not know that before). inside the subrequest the REQUEST_METHOD seems not to match the initial one which leads to a cached response being delivered for a POST request to /
line 1: is the final WordPress rule RewriteRule . /index.php [L]
which results in a subrequest (lines 2 and 3)
line 4 is the first cachify rule RewriteRule .* - [E=CACHIFY_HOST:https-%{HTTP_HOST}] this time applied to the subrequest to index.php
line 5 shows that for the subrequest the method is GET
6 & 7 are the cachify conditions
RewriteCond %{REQUEST_URI} !^/(wp-admin|wp-content/cache)/.*
RewriteCond %{HTTP_COOKIE} !(wp-postpass|wordpress_logged_in|comment_author)_
and in line 8 it gets rewritten to the cached path
I "fixed" it by prepending RewriteCond %{REQUEST_URI} /$ to the Main Rules block which makes the whole "set subdirectory" block useless. I'm not sure under which circumstances the condition RewriteCond %{REQUEST_URI} ^$ is true so im not sure if my "fix" breaks other setups.
The text was updated successfully, but these errors were encountered: