加载方法:
一、创建规则文件后添加到配置文件
在/etc/lighttpd目录创建规则文件discuzx31.conf内容为以下的规则内容,退出保存
修改配置lighttpd配置文件如:lighttpd.conf或者lighttpd-vhost.conf
在- server.document-root = "/home/wwwroot/htdocs"
复制代码 下面一行添加一行:
退出保存重启lighttpd服务
二、直接加载到配置文件中
修改配置lighttpd配置文件如:lighttpd.conf或者lighttpd-vhost.conf
在- server.document-root = "/home/wwwroot/htdocs"
复制代码 下面一行添加以下规则,保存退出后重启lighttpd服务即可
规则内容如下:- url.rewrite-once = (
- "^(.*)/topic-(.+)\.html$" => "$1/portal.php?mod=topic&topic=$2",
- "^(.*)/article-([0-9]+)-([0-9]+)\.html$" => "$1/portal.php?mod=view&aid=$2",
- "^(.*)/forum-(\w+)-([0-9]+)\.html$" => "$1/forum.php?mod=forumdisplay&fid=$2&page=$3",
- "^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=viewthread&tid=$2&extra=page%3D$4&page=$3",
- "^(.*)/group-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=group&fid=$2&page=$3",
- "^(.*)/space-(username|uid)-(.+)\.html$" => "$1/home.php?mod=space&$2=$3",
- "^(.*)/blog-([0-9]+)-([0-9]+)\.html$" => "$1/home.php?mod=space&uid=$2&do=blog&id=$3",
- "^(.*)/(fid|tid)-([0-9]+)\.html$" => "$1/index.php?action=$2&value=$3"
- )
复制代码
|