BDMV.INFO

Title: [2013.04.06] Discuz! X2 Pseudo-static Method at Lighttpd [Print this page]

author: 夢    time: 2013-4-6 14:08     Title: [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.
  1. url.rewrite-once = (
  2. "^(.*)/topic-(.+)\.html$" => "$1/portal.php?mod=topic&topic=$2",
  3. "^(.*)/article-([0-9]+)-([0-9]+)\.html$" => "$1/portal.php?mod=view&aid=$2",
  4. "^(.*)/forum-(\w+)-([0-9]+)\.html$" => "$1/forum.php?mod=forumdisplay&fid=$2&page=$3",
  5. "^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3",
  6. "^(.*)/group-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=group&fid=$2&page=$3",
  7. "^(.*)/space-(username|uid)-(.+)\.html$" => "$1/home.php?mod=space&$2=$3",
  8. "^(.*)/blog-([0-9]+)-([0-9]+)\.html$" => "$1/home.php?mod=space&uid=$2&do=blog&id=$3",
  9. "^(.*)/(fid|tid)-([0-9]+)\.html$" => "$1/index.php?action=$2&value=$3"
  10. )
Copy the Code

3.Add a commend into lighttpd.conf.
  1. include "discuzx2.conf"
Copy the Code

4.Restart the http server.

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






Welcome to BDMV.INFO (http://bdmv.info/snow/) Powered by Discuz! X2