Hi There,
We are using the following in .htaccess to cache pages for our WordPress sites:
So... If a user is logged into wp-admin, and has the "Show Toolbar" option ticked (default option) and browses the front end site, litespeed will cache that page - along with the toolbar! A non-logged in user comes along and litespeed serves the page from cache.. boom.
As you could imagine this was a serious WTF moment! was PHP caching sessions for some reason? bla bla.. it was quite funny when we worked it out.
Anyway.. we are at a blank - any ideas on how to stop this happening?
Note: As a work around, we have added "add_filter('show_admin_bar', '__return_false');" to the functions.php file in the theme, this disables the toolbar for all users no matter the setting in the admin.
Cheers! TGIF here in NZ!
Simon
We are using the following in .htaccess to cache pages for our WordPress sites:
Code:
# Litespeed Cache Control
<IfModule LiteSpeed>
CacheEnable public
RewriteEngine On
RewriteCond %{REQUEST_METHOD} ^GET|HEAD$
RewriteCond %{HTTP_HOST} ^www.thewoodentoybox.co.nz [NC]
RewriteCond %{REQUEST_URI} !wp-admin|wp-login.php|wp-cron.php|bla|otherpages|etc
RewriteRule .* - [E=Cache-Control:max-age=120]
</IfModule>
As you could imagine this was a serious WTF moment! was PHP caching sessions for some reason? bla bla.. it was quite funny when we worked it out.
Anyway.. we are at a blank - any ideas on how to stop this happening?
Note: As a work around, we have added "add_filter('show_admin_bar', '__return_false');" to the functions.php file in the theme, this disables the toolbar for all users no matter the setting in the admin.
Cheers! TGIF here in NZ!
Simon
Last edited by a moderator: