如鹏网 大学生计算机学习社区

CowNew开源团队

http://www.cownew.com 邮件请联系 about521 at 163.com

  BlogJava :: 首页 :: 新随笔 :: 联系 :: 聚合  :: 管理 ::
  363 随笔 :: 2 文章 :: 808 评论 :: 0 Trackbacks

1、编写rewrite脚本,编辑/etc/lighttpd/local.lighttpd.conf内容如下:
url.rewrite-once = (
        "^/forum/archiver/((fid|tid)-[\w\-]+\.html)$" => "forum/archiver/index.php?$1",
        "^/forum/forum-([0-9]+)-([0-9]+)\.html$" => "forum/forumdisplay.php?fid=$1&page=$2",
        "^/forum/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "forum/viewthread.php?tid=$1&extra=page%%53D$3&page=$2",
        "^/forum/space-(username|uid)-(.+)\.html$" => "forum/space.php?$1=$2",
        "^/forum/tag-(.+)\.html$" => "forum/tag.php?name=$1"
)
这里假设论坛装在forum目录下,如果是装在根目录下则是:
url.rewrite-once = (
        "^/archiver/((fid|tid)-[\w\-]+\.html)$" => "archiver/index.php?$1",
        "^/forum-([0-9]+)-([0-9]+)\.html$" => "forumdisplay.php?fid=$1&page=$2",
        "^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "viewthread.php?tid=$1&extra=page%%53D$3&page=$2",
        "^/space-(username|uid)-(.+)\.html$" => "space.php?$1=$2",
        "^/tag-(.+)\.html$" => "tag.php?name=$1"
)

2、重启lighttpd,重启方法:/etc/init.d/lighttpd restart

posted on 2009-05-16 21:41 CowNew开源团队 阅读(1138) 评论(0)  编辑  收藏 所属分类: 技术类

只有注册用户登录后才能发表评论。


网站导航: