- 帖子
- 8705
- 积分
- 27266
- 金钱
- 8451
- 在线时间
- 1895 小时
- 注册时间
- 2009-4-18
- 最后登录
- 2024-8-18
|
Lighttpd 伪静态规则:Discuz、disucz X、emlog、WordPress、phpwind地址重写规则
相关贴:
kloxo里Apache切换lighttpd方法,切换lighttpd好处。lighttpd设置rewrite伪静态操作
注:以下代规则,有些是未测试,只是收集过来。。
站友自行测试看。
phpwind伪静态规则
- url.rewrite = (“^(.*)-htm-(.*)$” => “$1.php?$2″)
复制代码
WordPress伪静态规则
- url.rewrite = (
- “^/(wp-.+).*/?” => “$0″,
- “^/(sitemap.xml)” => “$0″,
- “^/(xmlrpc.php)” => “$0″,
- “^/(.+)/?$” => “/index.php/$1″
- )
复制代码
Bo-Blog伪静态规则
- url.rewrite = (
- “^(.*)/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/read.php?entryid=$2&page=$3&part=$4″,
- “^(.*)/page/([0-9]+)/([0-9]+)/?$” => “$1/index.php?mode=$2&page=$3″,
- “^(.*)/starred/([0-9]+)/?([0-9]+)?/?$” => “$1/star.php?mode=$2&page=$3″,
- “^(.*)/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/index.php?go=category_$2&mode=$3&page=$4″,
- “^(.*)/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/index.php?go=archive&cm=$2&cy=$3&mode=$4&page=$5″,
- “^(.*)/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/index.php?go=showday_$2-$3-$4&mode=$5&page=$6″,
- “^(.*)/user/([0-9]+)/?$” => “$1/view.php?go=user_$2″,
- “^(.*)/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/tag.php?tag=$2&mode=$3&page=$4″,
- “^(.*)/component/id/([0-9]+)/?$” => “$1/page.php?pageid=$2″,
- “^(.*)/component/([^/]+)/?$” => “$1/page.php?pagealias=$2″
- )
复制代码
emlog3.3.0伪静态规则: (官方使用指南中就有)
- url.rewrite-once = (
- ”^(.*)/post-([0-9]+).html$”=>”$1/index.php?post=$2″,
- ”^(.*)/record-([0-9]+).html$”=>”$1/index.php?record=$2″,
- ”^(.*)/tag-(.+).html$”=>”$1/index.php?tag=$2″,
- ”^(.*)/page-([0-9]+).html$”=>”$1/index.php?page=$2″,
- ”^(.*)/sort-([0-9]+).html$”=>”$1/index.php?sort=$2″
- )
复制代码
emlog 4.0.1伪静态规则:
- url.rewrite-once = (
- "^(.*)/(rss|rb|xmlrpc|install|emlog_toolkit).php(.*)$" => "$1/$2.php$3",
- "^(.*)/up(\d.\d.\d)to(\d.\d.\d).php(.*)$" => "$1/up$1to$2.php$3",
- "^(.*)/favicon.ico$" => "$1/favicon.ico",
- "^(.*)/wlwmanifest.xml$" => "$1/wlwmanifest.xml",
- "^(.*)/(admin|content|include|t|m)/(.*)$" => "$1/$2/$3",
- "^(.*)/.*$" => "$1/index.php"
- )
复制代码
Discuz 伪静态规则:
- url.rewrite-once = (
- "^/bbs/archiver/((fid|tid)-[\w\-]+\.html)$" => "bbs/archiver/index.php?$1",
- "^/bbs/forum-([0-9]+)-([0-9]+)\.html$" => "bbs/forumdisplay.php?fid=$1&page=$2",
- "^/bbs/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "bbs/viewthread.php?tid=$1&extra=page=$3&page=$2",
- "^/bbs/space-(username|uid)-(.+)\.html$" => "bbs/space.php?$1=$2",
- "^/bbs/tag-(.+)\.html$" => "bbs/tag.php?name=$1"
- )
复制代码
(注此规则是在BBS子目录下的论坛,论坛在根目录下请去掉相应的 “bbs/”
如去掉后,最后一行为:"^/tag-(.+)\.html$" => "tag.php?name=$1"
lightttpd下disucz X 1.0 伪静态规则 :
- url.rewrite-once = (
- "^(.*)/topic-(.+)\.html$" => "$1/portal.php?mod=topic&topic=$2&%1",
- "^(.*)/article-([0-9]+)-([0-9]+)\.html$" => "$1/portal.php?mod=view&aid=$2&page=$3&%1",
- "^(.*)/forum-(\w+)-([0-9]+)\.html$" => "$1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1",
- "^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1",
- "^(.*)/group-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=group&fid=$2&page=$3&%1",
- "^(.*)/space-(username|uid)-(.+)\.html$" => "$1/home.php?mod=space&$2=$3&%1",
- "^(.*)/([a-z]+)-(.+)\.html$" => "$1/$2.php?rewrite=$3&%1",
- )
复制代码
lightttpd下disucz X 2.0 伪静态规则 : (注,有的说1.5版也一样)
- url.rewrite-once = (
- "^/topic-(.+)\.html$" => "/portal.php?mod=topic&topic=$1&$2",
- "^/article-([0-9]+)-([0-9]+)\.html$" => "/portal.php?mod=view&aid=$1&page=$2&$3",
- "^/forum-(\w+)-([0-9]+)\.html$" => "/forum.php?mod=forumdisplay&fid=$1&page=$2&$3",
- "^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "/forum.php?mod=viewthread&tid=$1&extra=page%3D$3&page=$2&$4",
- "^/group-([0-9]+)-([0-9]+)\.html$" => "/forum.php?mod=group&fid=$1&page=$2&$3",
- "^/space-(username|uid)-(.+)\.html$" => "/home.php?mod=space&$1=$2&$3",
- "^/blog-([0-9]+)-([0-9]+)\.html$" => "/home.php?mod=space&uid=$2&do=blog&page=$2&$3",
- "^/archiver-(fid|tid)-([0-9]+)\.html$" => "/archiver/index.php?action=$1&page=$2&%3",
- "^/([a-z]+)-(.+)\.html$" => "/$1.php?rewrite=$2&$3"
- )
复制代码
注意:这DX2规则未测试,贴主说这规则有两条不能用。注意去看来源贴。
可参考一下这贴:http://www.discuz.net/thread-2202910-1-1.html 具体未测试
----------------------------------------------相关贴:
emlog 4.0.1 lighttpd 伪静态规则 重写规则 emlog 3.5 lighttpd 伪静态规 |
|