我们先需要开启rewrite伪静态
具体操作方法:登陆KLOXO后台,依次展开域名,安装WP的域名,脚本,lighttpd地址重写规则,然后将上面的规则填入右边的输入框,update,完成后,记得到服务里面重启lighttpd,就可以了。如下图:

配置好之后我们重启一下lighttpd,现在就可以加规则了
Wordpress规则
代码如下 |
复制代码 |
url.rewrite = (
"^/(wp-.+).*/?" => "$0",
"^/(sitemap.xml)" => "$0",
"^/(xmlrpc.php)" => "$0",
"^/(.+)/?$" => "/index.php/$1"
)
|
lighttpd下Discuz的rewrite(伪静态)规则:
代码如下 |
复制代码 |
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=$3&page=$2",
"^/space-(username|uid)-(.+).html$" => "space.php?$1=$2",
"^/tag-(.+).html$" => "tag.php?name=$1"
)
|