phpbb extension/htaccess for Litespeed webserver

For users who wish to pay for specific services from other members.
NOTE: The phpBB team has no responsibility in these services whatsoever. Usage is at your own risk!
Forum rules
READ: Board-Wide Rules and Regulations
READ: Wanted's Forum Rules

NOTE: All contracts and services provided through this forum are at your own responsibility.
The phpBB Teams will NOT deal with disputes resulting from interactions through this forum.
Post Reply
User avatar
Registered User
Posts: 50
Joined: Sat Sep 04, 2010 8:25 pm

phpbb extension/htaccess for Litespeed webserver

Post by STN »

Title/Job Description: phpbb extension/htaccess required for litespeed cache

Target audience: (e.g. professionals, hobbyists, students): Doesn’t matter. Professional hopefully.

Reward: (e. g. money, backlinks, fame). Money

Deadline:: As soon as possible.

Preferred contact method: (e.g. PM, e-mail): PM

Link to the board:: FearlessRevolution

Detailed description of the tasks:


I use a webserver called Litespeed and it has a thing called Litespeed cache. What it does is cache the whole page including dynamic pages so there's no need for processing php/mysql which really speeds things up and make server able to handle a lot of requests.

The idea for a forum is to cache content for non-logged in users since guests can get away with seeing static/somewhat stale content whereas it's bypassed for logged in users as obviously registered users need to make posts/login etc and see fresh content the moment they post or browse.

They have made an extension for xenforo which basically sets a cookie for pages that xenforo itself doesn't produce a cookie for (e.g search) , so those pages can be excluded from cache and then with htaccess, sets cacheing rules for guests pages. It's quite simple actually once you see what it's doing. Rest of the stuff is taken care by litespeed server itself.

(it's free, you just need to register).

Unfortunately, they don't have anything for phpbb. No htaccess rules or an extension which would make sure that problematic pages like login/register/search etc are not cached. I don't know much htaccess so not sure how i would do it myself and if it's even possible with htaccess without needing an extension.

I am sure for people who know how phpbb works, this should be easy. Just bypass cacheing when a cookie is detected with htaccess rules and for pages where phpbb doesn't set cookie, set a cookie so you can exclude with htaccess. See example of xenforo

Code: Select all

# LiteSpeed XenForo cache
<IfModule litespeed>
    CacheLookup public on
    RewriteEngine On
    # cache
    RewriteCond %{HTTP_COOKIE} !(xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
    RewriteCond %{REQUEST_URI} !/install/ [NC]
    RewriteRule .* - [E=Cache-Control:max-age=360,E="cache-vary:xf_style_id,xf_language_id"]
    # no cache
    RewriteCond %{HTTP_COOKIE} (xf_lscxf_logged_in|xf_user|xf_session_admin) [NC]
    RewriteRule .* - [E=Cache-Control:vary=loggedin,E=Cache-Control:no-cache]
Still, i am willing to pay if someone wishes to be paid for for their efforts.

Post Reply

Return to “Wanted!”