Add extra code in .htaccess




Wordpress LScache Plugin: Add extra code in .htaccess

Last Updated on: Wed, 15 Apr 2026 00:00:02
Hi, I have a similar problem as described here: https://wordpress.org/support/topic/eu-cookie-law-and-litespeed-cache-problem/ So the following code in the .htaccess should help: RewriteRule . - [E=Cache-Vary:Cookie-NAME] But you say in .htaccess: Do not edit the contents of this block! What is the best way to add this extra line in the .htaccess? Just add it to the .htaccess? Or via the Toolbox? Im just wondering, because if I manually enter the line in the .htaccess, will it be overwritten by a future change in the cache settings? I like to have a permanent solution. Best regards Hi, that post is bit out out-dated please add the cache-vary rule at top of your .htaccess Best regards, Thanks, you mean it like this? # BEGIN GDPR COOKIE EXCLUDE RewriteEngine on CacheLookup on RewriteRule . - [E=Cache-Vary:wp_gdpr_cookie_preferences] # END GDPR COOKIE EXCLUDE # BEGIN LSCACHE ## LITESPEED WP CACHE PLUGIN - Do not edit the contents of this block! ## Best regards Hi, yes , add it OUTSIDE of #BEGIN(END) LSCACHE marker Best regards,



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



Reference