I don't fully understand what is going on, but the problem seems to be related to the internal subrequest to index.php file that is triggered via WordPress rewrite rules in .htaccess:
# 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
The subrequest apparently does not retain original %{REQUEST_METHOD}, so this BC Cache condition fails:
RewriteCond %{REQUEST_METHOD} !=POST
Also, somehow the cache file is matched, although it shouldn't because %{ENV:BC_CACHE_PATH} should be empty and thus there should be no directory separator before %{ENV:BC_CACHE_FILE}:
I don't fully understand what is going on, but the problem seems to be related to the internal subrequest to
index.php
file that is triggered via WordPress rewrite rules in.htaccess
:The subrequest apparently does not retain original
%{REQUEST_METHOD}
, so this BC Cache condition fails:Also, somehow the cache file is matched, although it shouldn't because
%{ENV:BC_CACHE_PATH}
should be empty and thus there should be no directory separator before%{ENV:BC_CACHE_FILE}
:I don't know for sure, but my guess is that:
%{REQUEST_URI}
is retained in the subrequest and so%{ENV:BC_CACHE_PATH}
is constructed correctly.%{ENV:BC_CACHE_PATH}
is retained in the subrequest.Anyway, the problem can be fixed with
[NS]
("nosubreq" flag) added to rewrite rule: