Exclude from lite cache

philler82
3 years, 2 months ago
Hi, I'm trying to make Lite Cache work on my site which uses Mobile Joomla 2.1.42. It works fine on the desktop site. However, when I use the phone to access the site, it always shows the desktop site instead of the mobile version (from Mobile Joomla). How can I exclude the Mobile site (or mobile users) from being served by Lite Cache, or better, how can I make Mobile Joomla work with Lite Cache?

Thanks
Philippe
dryabov
3 years, 2 months ago
Do you mean LiteSpeed Cache? If yes, there is an option "Separate View for Mobile Device" in the Advanced section of LiteSpeed Cache extension, could you check it is enabled?
philler82
3 years, 1 month ago
Hi, sorry for the late reply. I don't use the plugin but only some entries in the .htaccess file. Your hint pointed me to the right configuration entries in the file which are these additoinal lines to the existing ones:

<IfModule LiteSpeed>
RewriteEngine On
RewriteCond %{HTTP_USER_AGENT} Mobile|Android|Silk/|Kindle|BlackBerry|Opera\ Mini|Opera\ Mobi [NC]
RewriteRule .* - [E=Cache-Control:vary=ismobile]
RewriteCond %{REQUEST_URI} enquiry [NC]
RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>

This works now!

Thank you

By continuing to use this site you consent to the use of cookies on your device as described in our cookie policy unless you have disabled them. This site will not function correctly without cookies.

I accept cookies from this site.