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.
Procedure
First download and apply phpBB SEO MOD
Open your lighttpd configuration
# vi /etc/lighttpd/lighttpd.conf
Find out your virtual host (domain) specific configuration and append 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"
Want to stay up to date with the latest Linux tips, news and announcements? Subscribe to our free e-mail newsletter or RSS feed to get all updates.
You can Email this page to a friend.
You may also be interested in other helpful articles:
- Lighttpd mod_rewrite Hotlink Protection To Display Image Message
- Apache mod_rewrite examples for new Linux / UNIX admin
- Apache and Lighttpd server send error 503 when web site is under maintenance
- Download of the day: phpBB version 3 ( phpBB Gold )
- Book review: RT Essentials and The Definitive Guide to Apache mod_rewrite
Discussion on This Article:
Leave a Reply
We encourage your comments, and suggestions. But please stay on topic, be polite, and avoid spam. Thank you very much for stopping by our site!



I was hunting for these rules. thanks.