We have Wordpress installed at / and a forum installed at /forums. When the user logs in to the forums, a cookie is set. We have configured the LSCache Wordpress plugin to exclude caching if this cookie is present. The rewrite rule generated by the plugin is present in our .htaccess file, and the Litespeed context is set to load the .htaccess file.
The problem is that for some reason, the HOMEPAGE of wordpress keeps getting served from cache. Subpages of Wordpress (Pages, posts) are not served from cache when the user is logged in to the forum, which is the behavior we want. But for some reason, the Wordpress homepage continues to be served from cache, even though our .htaccess rule specifically tells it not to. Here is the relevant portion of the .htaccess file, which is present in the Wordpress root directory. These were the rules generated directly by the LSCache Wordpress plugin.
The problem is that for some reason, the HOMEPAGE of wordpress keeps getting served from cache. Subpages of Wordpress (Pages, posts) are not served from cache when the user is logged in to the forum, which is the behavior we want. But for some reason, the Wordpress homepage continues to be served from cache, even though our .htaccess rule specifically tells it not to. Here is the relevant portion of the .htaccess file, which is present in the Wordpress root directory. These were the rules generated directly by the LSCache Wordpress plugin.
Code:
### marker NOCACHE COOKIES start ###
RewriteCond %{HTTP_COOKIE} xf_user|xf_fbUid|xf_logged_in|_lscache_vary_xf
RewriteRule .* - [E=Cache-Control:no-cache]
### marker NOCACHE COOKIES end ###