Password Protected Page




Wordpress LScache Plugin: Password Protected Page

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hello, Few days ago I posted on OLS forum asking how to cache password protected pages and someone told me to add the following rule to .htaccess: RewriteRule . ? [E=Cache-Vary:wp-postpass] Now I wonder? Shouldnt it be already added there automagically by the plugin? This seems to be the default WP cookie for password protected pages. I sure would be more user friendly Hi @paulozlx, thank you for your suggestion. As the password protect field is not mandatory for posts, we will just keep the minimum code on .htaccess. I see. Can you explain this post so? https://blog.litespeedtech.com/2018/01/03/wpw-password-protected-posts/ This post says: If the password cookie exists, we only care about it in reference to the password-protected pages. Instead of relying on rewrite rules to detect the password cookie, LSCache relies on response headers to let it know when it is appropriate to even look for a password cookie. Is this valid only for LS Enterprise? https://github.com/litespeedtech/lscache_wp/blob/master/litespeed-cache/admin/litespeed-cache-admin-rules.class.php#L631 that rewrite rule is auto added for OLS users by here



LiteCache Rush: Speed comes from using less, not from doing it faster



Reference