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:lscache:geoip-support [2019/01/08 18:58]
Jackson Zhang
litespeed_wiki:cache:lscache:geoip-support [2022/04/20 19:07] (current)
Lisa Clarke
Line 1: Line 1:
-===== How to enable geolocation for LSCache ===== +~~REDIRECT>​https://​docs.litespeedtech.com/​lsws/​cp/​cpanel/​geoip/#use-geoip-for-cache-varies~~
- +
-LSCache supports GEOIPYou should [[litespeed_wiki:​cache:​common:​geoip-support|enable GeoIP module]] on LSWS firstly and test it to ensure the module is working. Then you can use different rewrite rules to meet your cache need.  +
- +
-For example, to make cache vary by ''​GEO_COUNTRY'',​ you can add the following rewrite rules to your “.htaccess” file: +
-   +
-  <​IfModule LiteSpeed>​ +
-    RewriteEngine on +
-    RewriteRule .* [E=Cache-Control:​vary=%{ENV:​GEO_COUNTRY}] +
-  </​IfModule>​ +
- +
-You can add rewrite condition ​for more specific rules, such as UK, EU and US + the rest of the world show different contents, or show different currencies.  +
  • Admin
  • Last modified: 2019/01/08 18:58
  • by Jackson Zhang