No teasers , I am actually releasing the lscache solution for phpbb3 and I am sure it works for phpbb2 as well since there is not much difference in how they operate.
All you need is to enter few htaccess rules and the name of your phpbb3/2 cookie name. Here is the code
Please note in the code where it says "PHPBB3COOKIENAME" replace it with your phpbb cookie name. DO NOT touch the _u part of it.
# LiteSpeed phpbb cache by NTS
<IfModule litespeed>
CacheLookup public on
RewriteEngine On
# cache
RewriteCond %{HTTP_COOKIE} !(PHPBB3COOKIENAME_u);? [NC,OR]
RewriteCond %{HTTP_COOKIE} (PHPBB3COOKIENAME_u=1);? [NC]
RewriteCond %{REQUEST_URI} viewtopic.php|memberlist.php|viewonline.php [NC]
RewriteRule .* - [E=Cache-Control:max-age=360,E=Cache-Control:vary=loggedin]
# no cache
RewriteCond %{HTTP_COOKIE} (PHPBB3COOKIENAME_u>1);? [NC]
RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>
That's it! It will cache topics/memberlist/whosonline. You can add more pages as you wish, I didn't want to cache the index page or viewforum so I can see fresh content there. max-age=360 is where you control how long the cache will be kept.
It took me half a day to get this right so I hope you guys appreciate me sharing this for free. Can't believe I am the only person in the whole wide world to do this for the first time
Enjoy
EDIT: I have perfected the solution. PM me if you want it
All you need is to enter few htaccess rules and the name of your phpbb3/2 cookie name. Here is the code
Please note in the code where it says "PHPBB3COOKIENAME" replace it with your phpbb cookie name. DO NOT touch the _u part of it.
# LiteSpeed phpbb cache by NTS
<IfModule litespeed>
CacheLookup public on
RewriteEngine On
# cache
RewriteCond %{HTTP_COOKIE} !(PHPBB3COOKIENAME_u);? [NC,OR]
RewriteCond %{HTTP_COOKIE} (PHPBB3COOKIENAME_u=1);? [NC]
RewriteCond %{REQUEST_URI} viewtopic.php|memberlist.php|viewonline.php [NC]
RewriteRule .* - [E=Cache-Control:max-age=360,E=Cache-Control:vary=loggedin]
# no cache
RewriteCond %{HTTP_COOKIE} (PHPBB3COOKIENAME_u>1);? [NC]
RewriteRule .* - [E=Cache-Control:no-cache]
</IfModule>
That's it! It will cache topics/memberlist/whosonline. You can add more pages as you wish, I didn't want to cache the index page or viewforum so I can see fresh content there. max-age=360 is where you control how long the cache will be kept.
It took me half a day to get this right so I hope you guys appreciate me sharing this for free. Can't believe I am the only person in the whole wide world to do this for the first time
Enjoy
EDIT: I have perfected the solution. PM me if you want it
Last edited: