Lighttpd phpBB SEO mod_rewrite Rules

PHP Bulletin Board (phpBB) is a popular Internet forum package written in the PHP programming language. It is free software released under GNU GPL Public License.

phpBB supports mods. These are code modifications created by the phpBB community. For search engine optimization you will find MOD here.

However this mod is Apache specific. To run phpBB SEO MOD under Lighttpd web server you need to make modification.


First download and apply phpBB SEO MOD by visiting this url.

Open your lighttpd configuration
# vi /etc/lighttpd/lighttpd.conf

Find out your virtual host (domain) specific configuration and append the rules as follows:
url.rewrite = (
"^.+-vc([0-9]+)\.html$" => "/index.php?c=$1",
"^.+-vf([0-9]+)-([0-9]+)\.html$" => "/viewforum.php?f=$1&start=$2",
"^.+-vf([0-9]+)\.html$" => "/viewforum.php?f=$1",
"^.+-vt([0-9]+)-([0-9]+)\.html$" => "/viewtopic.php?t=$1&start=$2",
"^.+-vt([0-9]+)\.html$" => "/viewtopic.php?t=$1",
"^.+-vt([0-9]+)\.html\?highlight=.*" => "/viewtopic.php?t=$1&highlight=$2",
"^/post([0-9]+)\.html$" => "/viewtopic.php?p=$1",
"^/member([0-9]+)\.html$" => "/profile.php?mode=viewprofile&u=$1"

Note: You must change / with your real phpBB installation folder or with nothing if it’s installed in the webroot /.

Save and close the change. Restart lighttpd webserver:
# /etc/init.d/lighttpd restart

If you are applying mx Google Sitemaps mod add following mod_rewrite rules to above ruleset:
"/sitemaps.xml" => "/sitemap.php",
"/forum-sitemap-([0-9]+).xml" => "/sitemap.php?fid=$1",
"/sitemap-forum.xml$" => "/sitemap.php?forum"

Save and close the file.

🐧 Please support my work on Patreon or with a donation.
🐧 Get the latest tutorials on Linux, Open Source & DevOps via:
CategoryList of Unix and Linux commands
File Managementcat
FirewallAlpine Awall CentOS 8 OpenSUSE RHEL 8 Ubuntu 16.04 Ubuntu 18.04 Ubuntu 20.04
Network Utilitiesdig host ip nmap
OpenVPNCentOS 7 CentOS 8 Debian 10 Debian 8/9 Ubuntu 18.04 Ubuntu 20.04
Package Managerapk apt
Processes Managementbg chroot cron disown fg jobs killall kill pidof pstree pwdx time
Searchinggrep whereis which
User Informationgroups id lastcomm last lid/libuser-lid logname members users whoami who w
WireGuard VPNAlpine CentOS 8 Debian 10 Firewall Ubuntu 20.04

Comments on this entry are closed.

Use HTML <pre>...</pre> for code samples. Problem posting comment? Email me @