How to exclude a file ?

#1
Hello everyone,

I put one of my sites at Planet Hoster with Litespeed server associated to LSCache.

With Admin Tools as security extension, it is necessary to exclude the / administrator file from the LS cache action (otherwise it will cause a bug with the files put in this folder).

Does anyone know how to exclude a folder from LS Cache ?

Must go through excluded URL ?

Thank you for your advice.
 

serpent_driver

Well-Known Member
#3
While it is unusual to have to exclude an administrator directory from caching, as this is usually done automatically by the respective plugin, to exclude calling a directory from caching, add the following rule to your .htaccess. Put this rule on top of your .htaccess.

Apache config:
RewriteCond %{REQUEST_URI} ^\/administrator\/
RewriteRule .* - [E=Cache-Control:no-cache]
 
Top