Page 2 of 2 FirstFirst 1 2
Results 16 to 26 of 26
Like Tree2Likes

Help to solve conflit between Litespeed guests cache + VBSEO

This is a discussion on Help to solve conflit between Litespeed guests cache + VBSEO within the General Discussion forums, part of the vBSEO SEO Plugin category; Originally Posted by GeorgeL Interesting, I tried litespeed cache on wordpress 3.0.4 with permalinks enabled via mod_rewrite and wordpress pages ...

  1. #16
    vBSEO.com Webmaster Mert Gökçeimam's Avatar
    Real Name
    Lizard King
    Join Date
    Oct 2005
    Location
    Istanbul, Turkey, Turkey
    Posts
    23,100
    Liked
    622 times
    Blog Entries
    4
    Quote Originally Posted by GeorgeL View Post
    Interesting, I tried litespeed cache on wordpress 3.0.4 with permalinks enabled via mod_rewrite and wordpress pages get cached fine. I haven't tried it on vBSEO yet though.
    Wordpress and vBSEO are way different scripts. Wordpress uses regular .htaccess redirect however vBSEO uses a wrapper file ( vbseo.php ) to redirect all urls to corret URLs. But i didn't test this as honestly i have no intension of paying for litespeed
    Mert Gökçeimam / Crawlability Inc.

    vBSEO 3.6.0 Alpha Önizlemesi - Including Like Tree
    Unveiling the NEW vBSEO Sitemap Generator 3.0 - available NOW for vBSEO Customers!


    Twitter:@Depkac
    Personal Blog : Mert Gökçeimam

  2. #17
    Member
    Real Name
    Mike Fara
    Join Date
    Feb 2006
    Posts
    56
    Liked
    7 times
    Interestingly, we have tested this code and it doesn't work at all. We have also tried just turning on the file cache in LiteSpeed. It works great for some time, but then it starts sending out infinite loop redirects over port 80. Some browsers will pick up on this error, and certainly search engine bots and things like the W3C Validator and Pingdom will. This is bad news. I can only assume this is due to the default rewrite rules in .htaccess for VBSEO not being interpreted correctly, or in a more strict format, when the file cache is enabled. The speed improvement is quite impressive, but I see no way to get it to work long-term. LiteSpeed does live up to its name, for so long as you have the RAM or disk space, you can handle tens of thousands of concurrent connections vs. apache.

  3. #18
    Junior Member
    Real Name
    GEORGE
    Join Date
    May 2008
    Location
    Brisbane, Australia
    Posts
    24
    Liked
    1 times
    Hi Mike

    Thanks to Mert 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

  4. #19
    Junior Member
    Real Name
    GEORGE
    Join Date
    May 2008
    Location
    Brisbane, Australia
    Posts
    24
    Liked
    1 times
    NiteWave from litespeed asked me to try this htaccess for vBSEO + litespeed cache, while it works to allow vBSEO to function, litespeed isn't caching the pages

    Code:
                                                                         
                                                                         
                                                                         
                                                 
    # Comment the following line (add '#' at the beginning)
    # to disable mod_rewrite functions.
    # Please note: you still need to disable the hack in
    # the vBSEO control panel to stop url rewrites.
    RewriteEngine On
    
    # Some servers require the Rewritebase directive to be
    # enabled (remove '#' at the beginning to activate)
    # Please note: when enabled, you must include the path
    # to your root vB folder (i.e. RewriteBase /forums/)
    #RewriteBase /
    
    #RewriteCond %{HTTP_HOST} !^www\.yourdomain\.com
    #RewriteRule (.*) http://www.yourdomain.com/forums/$1 [L,R=301]
    
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [QSA]
    
    RewriteCond %{HTTP_COOKIE} vbseo_loggedin=deleted
    RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule (.*) - [L,E=Cache-Control:max-age=120]

  5. #20
    Senior Member
    Real Name
    John
    Join Date
    Dec 2005
    Posts
    762
    Liked
    30 times
    So what was the final configuration that made this work correctly? Still using product-boostv1.xml?

  6. #21
    Senior Member
    Real Name
    John
    Join Date
    Dec 2005
    Posts
    762
    Liked
    30 times
    Anyone?

  7. #22
    Member
    Real Name
    Dinh Thanh
    Join Date
    Sep 2010
    Posts
    93
    Liked
    21 times
    With help of VBSEO Staff,
    We made it working fine now. Please use this for your htaccess

    ### VBSEO
    RewriteRule ^((urllist|sitemap_).*\.(xml|txt)(\.gz)?)$ vbseo_sitemap/vbseo_getsitemap.php?sitemap=$1 [L]
    RewriteCond %{REQUEST_URI} !(admincp/|modcp/|cron|vbseo_sitemap)
    RewriteRule ^((archive/)?(.*\.php(/.*)?))$ vbseo.php [L,QSA]
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !/(admincp|modcp|clientscript|cpstyles|images)/
    RewriteRule ^(.+)$ vbseo.php [QSA]

    RewriteCond %{HTTP_COOKIE} !vbseo_loggedin=yes
    RewriteCond %{HTTP_COOKIE} !mobile_device
    RewriteCond %{HTTP_COOKIE} !bb_userid=
    RewriteCond %{HTTP_COOKIE} !bb_password=
    RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
    RewriteCond %{QUERY_STRING} ^$
    RewriteRule (.*) - [L,E=Cache-Control:max-age=120]

  8. #23
    Senior Member
    Real Name
    John
    Join Date
    Dec 2005
    Posts
    762
    Liked
    30 times
    dihuta - I've tried every different configuration and I still can't get the cache working correctly. I placed the rules above after vbseo and the cache doesn't appear to be working. When I look in the litespeed stats there is a 0 under cache hits.

  9. #24
    Member
    Real Name
    Dinh Thanh
    Join Date
    Sep 2010
    Posts
    93
    Liked
    21 times
    a Litespeed staff modified my Varnish Mod for vBulletin.
    I attach here that modified Mod which I'm using.
    Be sure to set cache folder for Litespeed Cache to properly created folder.
    Attached Files

  10. #25
    Senior Member
    Real Name
    John
    Join Date
    Dec 2005
    Posts
    762
    Liked
    30 times
    yep, I have a very similar plugin installed. I also have the disk cache folder setup in litespeed.

    The only way I get anything to work is if I put the rules before the vbseo rules, but then I just get errors all over the place.

  11. #26
    Member
    Real Name
    Dinh Thanh
    Join Date
    Sep 2010
    Posts
    93
    Liked
    21 times
    If it sill can not work, you should contact a litespeed staff for help.

Page 2 of 2 FirstFirst 1 2

Similar Threads

  1. Litespeed ve Vbseo
    By want3d in forum Türkçe
    Replies: 6
    Last Post: 06-08-2011, 07:52 AM
  2. Does vbseo works with litespeed ?
    By dhddl in forum Troubleshooting
    Replies: 1
    Last Post: 09-27-2009, 05:34 AM
  3. How i Solve This Url Problem With Vbseo And forumpages ?
    By Jason4Ever in forum General Discussion
    Replies: 8
    Last Post: 06-22-2009, 11:10 AM
  4. vbseo not working with litespeed for me
    By hornstar6969 in forum Troubleshooting
    Replies: 1
    Last Post: 02-03-2008, 03:03 PM
  5. VBSEO on Litespeed Webserver
    By reteep in forum Pre-Sales Questions
    Replies: 6
    Last Post: 08-30-2007, 04:43 PM

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •