Publish time 2013-4-6 14:08:49

[2013.04.06] Discuz! X2 Pseudo-static Method at Lighttpd

1. Add the "mod_rewrite" into server modules.

2.Create a new rule document at /etc/lighttpd/discuzx2.conf.
url.rewrite-once = (
"^(.*)/topic-(.+)\.html$" => "$1/portal.php?mod=topic&topic=$2",
"^(.*)/article-(+)-(+)\.html$" => "$1/portal.php?mod=view&aid=$2",
"^(.*)/forum-(\w+)-(+)\.html$" => "$1/forum.php?mod=forumdisplay&fid=$2&page=$3",
"^(.*)/thread-(+)-(+)-(+)\.html$" => "$1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3",
"^(.*)/group-(+)-(+)\.html$" => "$1/forum.php?mod=group&fid=$2&page=$3",
"^(.*)/space-(username|uid)-(.+)\.html$" => "$1/home.php?mod=space&$2=$3",
"^(.*)/blog-(+)-(+)\.html$" => "$1/home.php?mod=space&uid=$2&do=blog&id=$3",
"^(.*)/(fid|tid)-(+)\.html$" => "$1/index.php?action=$2&value=$3"
)

3.Add a commend into lighttpd.conf.
include "discuzx2.conf"
4.Restart the http server.

http://www.discuz.net/thread-2275242-1-1.html
http://www.opendebug.com/article/532545

Pages: [1]
View full version: [2013.04.06] Discuz! X2 Pseudo-static Method at Lighttpd