A-A+

lighttpd下WordPress和Discuz的rewrite规则

2013年05月02日 服务器 暂无评论 阅读 12,372 次

lighttpd下WordPress的rewrite(伪静态)规则:

url.rewrite = (
 "^/(wp-.+).*/?" => "$0",
 "^/(sitemap.xml)" => "$0",
 "^/(xmlrpc.php)" => "$0",
 "^/(.+)/?$" => "/index.php/$1"
 )

lighttpdDiscuz的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"
 )

给我留言