找回密码
 注册

QQ登录

只需一步,快速开始

搜索
查看: 1871|回复: 1

[Discuz! X] Lighttpd下Discuz X2伪静态规则

[复制链接]
发表于 2012-1-12 21:42:19 | 显示全部楼层 |阅读模式
本帖最后由 神马 于 2012-1-12 21:45 编辑

如果你的空间使用的是Lighttpd系统,那么可以用下面这样的伪静态规则,该规则适用于Discuz! X2, Discuz! X2 RC等。

安装在根目录上用这个

  1. url.rewrite = (
  2.     "^/topic-(.+)\.html\??(.*+)$" => "/portal.php?mod=topic&topic=$1&$2",
  3.     "^/article-([0-9]+)-([0-9]+)\.html\??(.*+)$" => "/portal.php?mod=view&aid=$1&page=$2&$3",
  4.     "^/forum-(\w+)-([0-9]+)\.html\??(.*+)$" => "/forum.php?mod=forumdisplay&fid=$1&page=$2&$3",
  5.     "^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\??(.*+)$" => "/forum.php?mod=viewthread&tid=$1&extra=page%3D$3&page=$2&$4",
  6.     "^/group-([0-9]+)-([0-9]+)\.html\??(.*+)$" => "/forum.php?mod=group&fid=$1&page=$2&$3",
  7.     "^/space-(username|uid)-(.+)\.html\??(.*+)$" => "/home.php?mod=space&$1=$2&$3",
  8.     "^/([a-z]+)-(.+)\.html\??(.*+)$" => "/$1.php?rewrite=$2&$3")
复制代码
安装在子目录上用这样的(以子目录bbs为例)
  1. url.rewrite-once = (
  2.     "^/bbs/topic-(.+)\.html\??(.*+)$" => "/bbs/portal.php?mod=topic&topic=$1&$2",
  3.     "^/bbs/article-([0-9]+)-([0-9]+)\.html\??(.*+)$" => "/bbs/portal.php?mod=view&aid=$1&page=$2&$3",
  4.     "^/bbs/forum-(\w+)-([0-9]+)\.html\??(.*+)$" => "/bbs/forum.php?mod=forumdisplay&fid=$1&page=$2&$3",
  5.     "^/bbs/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html\??(.*+)$" => "/bbs/forum.php?mod=viewthread&tid=$1&extra=page%3D$3&page=$2&$4",
  6.     "^/bbs/group-([0-9]+)-([0-9]+)\.html\??(.*+)$" => "/bbs/forum.php?mod=group&fid=$1&page=$2&$3",
  7.     "^/bbs/space-(username|uid)-(.+)\.html\??(.*+)$" => "/bbs/home.php?mod=space&$1=$2&$3",
  8.     "^/bbs/([a-z]+)-(.+)\.html\??(.*+)$" => "/bbs/$1.php?rewrite=$2&$3")
复制代码
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

QQ|Archiver|手机版|小黑屋|王牌互联

GMT+8, 2024-12-21 04:45 , Processed in 0.035296 second(s), 15 queries .

Powered by Discuz! X3.5

© 2001-2023 Discuz! Team.

快速回复 返回顶部 返回列表