良玉的博客 点点滴滴,积水成河_良玉的博客_页游、手游linux运维工程师之路

lighttpd环境下添加rewrite(伪静态)规则

我们系统默认已经开启了伪静态功能,但是需要自行添加所用程序的伪静态规则

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

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

Discuz lighttpd的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"
)


标签: linuxlighttpd伪静态

作者:良玉 分类:lighttpd 浏览:629 评论:0
留言列表
发表评论
来宾的头像