lighttpd服务器Kloxo面板添加Discuz论坛重写规则

老牛  2011-08-23 19:54  阅读 197 views 次 评论 0 条

在Kloxo面板里配置lighttpd的Discuz X2.0论坛重写(rewrite、伪静态)规则:

在“域名”中找到要配置的域名,展示,选择“脚本”里的“lighttpd地址重写规则”,添加重写规则:

url.rewrite = (

"^/topic-(.+).html$" => "/portal.php?mod=topic&topic=$1",

"^/article-([0-9]+).html$" => "/portal.php?mod=article&articleid=$1",

"^/forum-(w+)-([0-9]+).html$" => "/forum.php?mod=forumdisplay&fid=$1&page=$2",

"^/thread-([0-9]+)-([0-9]+)-([0-9]+).html$" => "/forum.php?mod=viewthread&tid=$1&extra=page=$3&page=$2",

"^/group-([0-9]+)-([0-9]+).html$" => "/forum.php?mod=group&fid=$1&page=$2",

"^/space-(username|uid)-(.+).html$" => "/home.php?mod=space&$1=$2",

"^/([a-z]+)-(.+).html$" => "/$1.php?rewrite=$2"

)

另外,lighttpd下wordpress的重写规则是:

url.rewrite = (

"^/(wp-.+).*/?" => "$0",

"^/(sitemap.xml)" => "$0",

"^/(xmlrpc.php)" => "$0",

"^/(.+)/?$" => "/index.php/$1"

)

历史上的今天:

本文地址:http://xiaohost.com/60.html
版权声明:本文为原创文章,版权归 老牛 所有,欢迎分享本文,转载请保留出处!

发表评论


表情