Try this. This should work if readme.txt is in domain root directory. Otherwise remove ^
<FilesMatch "^(readme)\.txt$">
Order allow,deny
Deny from all
</FilesMatch>
Support for OpenLiteSpeed:
https://forum.openlitespeed.org/
Please explain how to set cookie with PHP if there is no PHP if page is already cached?
PHP and .htaccess can't detect if client accept cookie or not. You can only check if client sends request cookie or not, but only with .htaccess and not with PHP if page is already cached.
I have either a missunderstanding or cache-control has a bug or documentation is wrong. It's about cache-control directive and to purge private cache with .htaccess RewriteRule.
In LiteSpeed documentation https://docs.litespeedtech.com/lscache/devguide/controls/#cache-control there are usage...
You should better open a support ticket to get qualified answer for this question:
https://store.litespeedtech.com/store/submitticket.php?step=2&deptid=1
Check this out:
https://www.litespeedtech.com/support/forum/threads/how-to-force-a-link-to-download-a-file-instead-of-opening-it-on-the-browser.18966/#post-112308
If you are on shared hosting ask your provider if your host uses a CDN like Cloudflare or a proxy.
If nothing helps try to overwrite this header in .htaccess
header add X-Turbo-Charged-By "Name of your choice"
To me the same, because no LiteSpeed plugin caches. Each plugin is only a control panel to control and manage the cache. Caching itself will only be done by Lscache, a LSWS based cache engine.