BDMV.INFO

 Retrieve Password
 register now
Search
Hot: #
!show!: 27149|Reply: 0
Print Prev. thread Next thread

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

Rank: 9Rank: 9Rank: 9

Jump to a specific floor
樓主
Post time 2013-4-6 14:08:49 |Show the author posts only |Descending
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

You have to log in before you can reply Login | register now

Archiver|Cell Phone|BDMV.INFO

GMT+8, 2024-4-19 23:48 , Processed in 0.009815 second(s), 5 queries , Xcache On.

Powered by Discuz! X2

© 2001-2011 Comsenz Inc.

Top