Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision Next revision Both sides next revision | ||
litespeed_wiki:litespeed:cache:vbulletin [2012/05/08 01:56] 127.0.0.1 external edit |
litespeed_wiki:litespeed:cache:vbulletin [2015/04/20 18:42] Serge Espitia |
||
---|---|---|---|
Line 88: | Line 88: | ||
3. Modify rewrite rules in .htaccess | 3. Modify rewrite rules in .htaccess | ||
- | Rewrite Rules: | + | Rewrite Rules: on the very beginning, maybe just after |
<code> | <code> | ||
- | RewriteRule ^(.+)$ vbseo.php [L,QSA] | + | RewriteEngine On |
</code> | </code> | ||
- | + | add | |
- | Change to | + | |
<code> | <code> | ||
- | RewriteRule ^(.+)$ vbseo.php [QSA] | + | #rules for litespeed cache: begin |
- | + | ||
- | #rules for litespeed cache: | + | |
RewriteCond %{HTTP_COOKIE} !vbseo_loggedin=yes | RewriteCond %{HTTP_COOKIE} !vbseo_loggedin=yes | ||
RewriteCond %{HTTP_COOKIE} !bbuserid= | RewriteCond %{HTTP_COOKIE} !bbuserid= | ||
Line 104: | Line 101: | ||
RewriteCond %{REQUEST_METHOD} ^HEAD|GET$ | RewriteCond %{REQUEST_METHOD} ^HEAD|GET$ | ||
RewriteCond %{QUERY_STRING} ^$ | RewriteCond %{QUERY_STRING} ^$ | ||
- | RewriteRule (.*) - [L,E=Cache-Control:max-age=60] | + | RewriteRule (.*) - [E=Cache-Control:max-age=60] |
+ | #rules for litespeed cache: end | ||
</code> | </code> | ||
+ | There is no need to change any other rewrite rules that come from vBSEO or other sources. | ||
4. Enable and Set up Cache Policy in LSWS | 4. Enable and Set up Cache Policy in LSWS | ||
Line 130: | Line 129: | ||
- Cache storage can be set to /dev/shm/diskcache to avoid disk I/O wait if enough memory can be spared. | - Cache storage can be set to /dev/shm/diskcache to avoid disk I/O wait if enough memory can be spared. | ||
- Cache resource with size less than 128KB. | - Cache resource with size less than 128KB. | ||
+ | - your vB's coookie name may vary, for example my_userid instead of bbuserid, depends on your vB configuration. | ||
- For cached request, "X-LiteSpeed-Cache: hit" response header should be seen. IOW, if no such entry in the response header, the response is not cached by LSWS. | - For cached request, "X-LiteSpeed-Cache: hit" response header should be seen. IOW, if no such entry in the response header, the response is not cached by LSWS. | ||
Line 140: | Line 140: | ||
</code> | </code> | ||
- | **Note:** This cron job clean up stale cache storage every 10 minutes. | + | **Note:** This cron job cleans up stale cache storage every 10 minutes. |