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

  • A+
所属分类:Lighttpd

在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"

)

发表评论

:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: