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

Go Back   LiteSpeed Support Forums > LiteSpeed Web Server > LiteSpeed Cache > vBulletin Guest Cache with LiteSpeed

Reply
 
Thread Tools Display Modes
  #51  
Old 02-24-2011, 12:02 PM
track1 track1 is offline
Member
 
Join Date: Oct 2010
Posts: 46
Quote:
Originally Posted by mistwang View Post
with LSWS 4.0.20, change header() code or add a new one

Code:
header('X-LiteSpeed-Cache-Control: no-cache' );
it will prevent LSWS from caching this page.
ok great, just upgraded to 4.0.20 and changed that header.

Haven't found why sometimes .htaccess rules were not respected, but i hope with this, any logged user page will be cached and server to not logged in users.

Last edited by track1; 02-24-2011 at 12:04 PM..
Reply With Quote
  #52  
Old 03-01-2011, 05:44 AM
eva2000 eva2000 is offline
Senior Member
 
Join Date: Dec 2004
Location: Brisbane, Australia
Posts: 142
Thanks for thank NiteWave reminded me you'd have to enable the plugin for it to work so plugin active from 0 to 1 - see http://vbtechsupport.com/127/

so from

PHP Code:
        <plugin active="0" executionorder="1">
            <
title>Send X-Accel-Expires header for logged in users</title>
            <
hookname>style_fetch</hookname>
            <
phpcode><![CDATA[// Do not cache logged in user pages
if ( $vbulletin->userinfo['userid'] )
{
        
header('X-Accel-Expires: 0');
};]]></
phpcode>
        </
plugin
to
PHP Code:
        <plugin active="1" executionorder="1">
            <
title>Send X-Accel-Expires header for logged in users</title>
            <
hookname>style_fetch</hookname>
            <
phpcode><![CDATA[// Do not cache logged in user pages
if ( $vbulletin->userinfo['userid'] )
{
        
header('X-LiteSpeed-Cache-Control: no-cache' );
};]]></
phpcode>
        </
plugin
Reply With Quote
  #53  
Old 03-01-2011, 05:46 PM
dihuta dihuta is offline
Member
 
Join Date: Oct 2010
Posts: 37
It's is working now with VB+VBSEO but there is an error showing sometimes when I open my website:

Quote:
Your submission could not be processed because you have logged in since the previous page was loaded, please reload the windows.
This error may come from ajax.
Could you please help?
Thanks.
Reply With Quote
  #54  
Old 03-03-2011, 08:24 PM
mistwang mistwang is offline
LiteSpeed Staff
 
Join Date: May 2003
Location: New Jersey
Posts: 7,603
Maybe cached some page should not be cached.
The error is related to a security token from my google result.
what rewrite rule and code patch are you using?
Does a reload fix it?
check the response header "x-litespeed-cache: hit" see if you get a cached page, for login user, should not get any cached page.
Reply With Quote
  #55  
Old 03-15-2011, 07:39 AM
dihuta dihuta is offline
Member
 
Join Date: Oct 2010
Posts: 37
Quote:
Originally Posted by mistwang View Post
Maybe cached some page should not be cached.
The error is related to a security token from my google result.
what rewrite rule and code patch are you using?
Does a reload fix it?
check the response header "x-litespeed-cache: hit" see if you get a cached page, for login user, should not get any cached page.

Here is the rewrite rulte:
Quote:
RewriteCond &#37;{HTTP_COOKIE} !vbseo_loggedin
RewriteCond %{ORG_REQ_URI} !(login/wait|admincp|phpmyadmin|modcp|uploader|(login|regi ster|usercp|private|profile|cron|image|index_vbgal lery)\.php)
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$
RewriteCond %{QUERY_STRING} ^$
RewriteRule (.*) - [L,E=Cache-Control:max-age=300]

Reload can fix it. This issue happen when we re-visit the forum after a time.

Last edited by dihuta; 03-15-2011 at 07:42 AM..
Reply With Quote
Reply

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 10:21 PM.



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