Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
litespeed_wiki:cache:lscxf2 [2020/02/17 20:03]
Michael Alegre [Configuration] Added note and recommendation that .htaccess code be added to the top of the file and before any rules containing the [L] flag.
litespeed_wiki:cache:lscxf2 [2020/02/27 16:33] (current)
Michael Alegre [Configuration] Added missing style and language varys to .htaccess caching rules.
Line 19: Line 19:
   * **Note:** Ensure that this code is added before any rewrite rules containing the ''​[L]''​ flag which could stop ''​.htaccess''​ processing and prevent the code from being executed.   * **Note:** Ensure that this code is added before any rewrite rules containing the ''​[L]''​ flag which could stop ''​.htaccess''​ processing and prevent the code from being executed.
  
-  ​# LiteSpeed XenForo cache +<​code>​ 
-  <​IfModule litespeed>​ +# LiteSpeed XenForo cache 
-      CacheLookup public on +<​IfModule litespeed>​ 
-      RewriteEngine On +    CacheLookup public on 
-      # cache +    RewriteEngine On 
-      RewriteCond %{HTTP_COOKIE} !(xf_lscxf_logged_in|xf_user|xf_session_admin) [NC] +    # cache 
-      RewriteCond %{REQUEST_URI} !/install/ [NC] +    RewriteCond %{HTTP_COOKIE} !(xf_lscxf_logged_in|xf_user|xf_session_admin) [NC] 
-      RewriteRule .* - [E=Cache-Control:​max-age=360] +    RewriteCond %{REQUEST_URI} !/install/ [NC] 
-      # no cache +    RewriteRule .* - [E=Cache-Control:​max-age=360,​E="​cache-vary:​xf_style_id,​xf_language_id"​
-      RewriteCond %{HTTP_COOKIE} (xf_lscxf_logged_in|xf_user|xf_session_admin) [NC] +    # no cache 
-      RewriteRule .* - [E=Cache-Control:​vary=loggedin,​E=Cache-Control:​no-cache] +    RewriteCond %{HTTP_COOKIE} (xf_lscxf_logged_in|xf_user|xf_session_admin) [NC] 
-  </​IfModule>​ +    RewriteRule .* - [E=Cache-Control:​vary=loggedin,​E=Cache-Control:​no-cache] 
 +</​IfModule>​ 
 +</​code>​
 ===== Notes ===== ===== Notes =====
  
  • Admin
  • Last modified: 2020/02/27 16:33
  • by Michael Alegre