LiteSpeed Technologies
Download Download     Blog Blog     Wiki Wiki     Forum Forum     Store     Contact Contact    

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > LiteSpeed Cache > Litespeed cache + vB + vBSEO conflicts/issues ?

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #1  
Old 01-30-2011, 04:24 PM
eva2000 eva2000 is offline
Senior Member
 
Join Date: Dec 2004
Location: Brisbane, Australia
Posts: 142
Post Litespeed cache + vB + vBSEO conflicts/issues ?

Thanks to Mert over at vBSEO, I got a test license installed on local server, from what I can see, this is what is happening. vBulletin varnish xml plugin has extra code to assign custom cookies to members and guests (session prefix + imgloggedin yes) and also code to strip guest visitors of the session id/hash so that varnish will cache guests without cookies. Litespeed cache's .htaccess tries to match these plugin cookies so you're telling litespeed cache to cache php pages where imloggedin=yes isn't set and where userid/password cookie isn't set.

default litespeed cache .htaccess i am using

Code:
RewriteCond %{HTTP_COOKIE} !zzimloggedin=yes
RewriteCond %{HTTP_COOKIE} !zzuserid=
RewriteCond %{HTTP_COOKIE} !zzpassword=
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} !s=[a-fA-F0-9]{32}
RewriteCond %{QUERY_STRING} !product=vbnexus
RewriteCond %{REQUEST_URI} !^(login|register|usercp|private|profile|cron|image)\.php$
RewriteCond %{REQUEST_URI} !^admincp
RewriteRule ^(.*\.php)?$ - [L,E=Cache-Control:max-age=300]
Varnish plugin stripping guests of session id/hash

PHP Code:
if($vbulletin->userinfo['userid'] <= 0)
{
$vbulletin->session->vars['sessionurl']  = '';
$vbulletin->session->vars['sessionurl_q']  = '';

Now what is happening is when vbseo is enabled, it seems to be reintroducing the guest visitors session id/hash into the cookies for guests.

vBSEO Disabled

This is what i see with vbseo disabled, only zzlastactivity and zzlastvisit cookies are set when varnish plugin enabled as it strips sessionid/hash.



Header for vBSEO disabled with varnish plugin enabled



vBSEO Enabled

Now when you enable vbseo, session id/hash for guests is reintroduced along with vbseo_loggedin=yes/deleted for members/guests, which in theory if you used varnish cache (in apache+varnish setup), varnish wouldn't cache the vbseo page as it has cookies vbseo_loggedin so varnish vcl would need adjusting. But it doesn't explain why litespeed cache isn't caching the page other than proper detection of vbseo_loggedin cookie in htaccess ?



Header when vBSEO enabled with Varnish plugin enabled



litespeed htaccess might need additional for guests caching somewhere ?

Code:
RewriteCond %{HTTP_COOKIE} vbseo_loggedin=deleted
Reply With Quote
 

Tags
cookies, litespeed cache, vbseo, vbulletin

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump


All times are GMT -7. The time now is 04:39 PM.



- Archive - Top
© Copyright 2003-2011 LiteSpeed Technologies, Inc. All rights reserved. Privacy Policy.