Lighttpd 伪静态规则:Discuz、disucz X、emlog、WordPress、phpwind地址重写规则
相关贴:[url=http://www.idc866.com/thread-13076-1-1.html]kloxo里Apache切换lighttpd方法,切换lighttpd好处。lighttpd设置rewrite伪静态操作[/url]
注:以下代规则,有些是未测试,只是收集过来。。
站友自行测试看。
[b]phpwind伪静态规则[/b]
[code]url.rewrite = (“^(.*)-htm-(.*)$” => “$1.php?$2″)[/code]
[b]WordPress伪静态规则[/b]
[code]url.rewrite = (
“^/(wp-.+).*/?” => “$0″,
“^/(sitemap.xml)” => “$0″,
“^/(xmlrpc.php)” => “$0″,
“^/(.+)/?$” => “/index.php/$1″
)[/code]
[b]Bo-Blog伪静态规则[/b]
[code]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″
)[/code]
[b]emlog3.3.0伪静态规则: (官方使用指南中就有)[/b]
[code]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″
)[/code]
[b]emlog 4.0.1伪静态规则:[/b]
[code]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"
)[/code]
[b]Discuz 伪静态规则:
[/b][code]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"
)
[/code]
(注此规则是在BBS子目录下的论坛,论坛在根目录下请去掉相应的 “bbs/”
如去掉后,最后一行为:"^/tag-(.+)\.html$" => "tag.php?name=$1"
[b]lightttpd下disucz X 1.0 伪静态规则[/b] :
[code]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",
)[/code]
[b]lightttpd下disucz X 2.0 伪静态规则[/b] : (注,有的说1.5版也一样)
[code]
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"
)
[/code]
[color=#ff0000]注意:[/color]这DX2规则未测试,贴主说这规则有两条不能用。注意去看来源贴。
可参考一下这贴:[url=http://www.discuz.net/thread-2202910-1-1.html]http://www.discuz.net/thread-2202910-1-1.html[/url] 具体未测试
----------------------------------------------相关贴:
[url=http://www.idc866.com/thread-13071-1-1.html][color=#000000]emlog 4.0.1 lighttpd 伪静态规则 重写规则 emlog 3.5 lighttpd 伪静态规[/color][/url] 其它程序收集:
[b]lighttpd 的ecshop伪静态规则[/b] (注意:这是在子目录/soarb/下,如根目录请把他换成/)
[code]
url.rewrite = (
"^/soarb/index.html$" => "/soarb/index.php",
"^/soarb/category$" => "/soarb/index.php",
"^/soarb/feed-c([0-9]+).xml$" => "/soarb/feed.php?cat=$1",
"^/soarb/feed-b([0-9]+).xml$" => "/soarb/feed.php?brand=$1",
"^/soarb/feed-type([^-]+).xml$" => "/soarb/feed.php?type=$1",
"^/soarb/feed.xml$" => "/soarb/feed.php",
"^/soarb/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5&page=$6&sort=$7&order=$8",
"^/soarb/category-([0-9]+)-b([0-9]+)-min([0-9]+)-max([0-9]+)-attr([^-]*)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&price_min=$3&price_max=$4&filter_attr=$5",
"^/soarb/category-([0-9]+)-b([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&page=$3&sort=$4&order=$5",
"^/soarb/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&page=$3",
"^/soarb/category-([0-9]+)-b([0-9]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2",
"^/soarb/category-([0-9]+)(.*).html$" => "/soarb/category.php?id=$1",
"^/soarb/goods-([0-9]+)(.*).html$" => "/soarb/goods.php?id=$1",
"^/soarb/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/article_cat.php?id=$1&page=$2&sort=$3&order=$4",
"^/soarb/article_cat-([0-9]+)-([0-9]+)(.*).html$" => "/soarb/article_cat.php?id=$1&page=$2",
"^/soarb/article_cat-([0-9]+)(.*).html$" => "/soarb/article_cat.php?id=$1",
"^/soarb/article-([0-9]+)(.*).html$" => "/soarb/article.php?id=$1",
"^/soarb/brand-([0-9]+)-c([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+).html$" => "/soarb/brand.php?id=$1&cat=$2&page=$3&sort=$4&order=$5",
"^/soarb/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1&cat=$2&page=$3",
"^/soarb/brand-([0-9]+)-c([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1&cat=$2",
"^/soarb/brand-([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1",
"^/soarb/tag-(.*).html$" => "/soarb/search.php?keywords=$1",
"^/soarb/snatch-([0-9]+).html$" => "/soarb/snatch.php?id=$1",
"^/soarb/group_buy-([0-9]+).html$" => "/soarb/group_buy.php?act=view&id=$1",
"^/soarb/auction-([0-9]+).html$" => "/soarb/auction.php?act=view&id=$1",
"^/soarb/exchange-id([0-9]+)(.*).html$" => "/soarb/exchange.php?id=$1&act=view",
"^/soarb/exchange-([0-9]+)-min([0-9]+)-max([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&integral_min=$2&integral_max=$3&page=$4&sort=$5&order=$6",
"^/soarb/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&page=$2&sort=$3&order=$4",
"^/soarb/exchange-([0-9]+)-([0-9]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&page=$2",
"^/soarb/exchange-([0-9]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1"
)[/code]
来源:[url=http://bbs.ecshop.com/thread-102600-1-1.html]http://bbs.ecshop.com/thread-102600-1-1.html[/url]
[b]pbdigg Lighttpd 伪静态规则:[/b]
[code]url.rewrite-once = (
"^/index\.html(&page=([0-9]+))?$" => "/index\.php?page=$2",
"^/category/([0-9]+)(&page=([0-9]+))?$" => "/category\.php?cid=$1&page=$3",
"^/user/([0-9]+)(&page=([0-9]+))?$" => "/user\.php?uid=$1&page=$3",
"^/show/([0-9]+)\.html(&page=([0-9]+))?$" => "/show\.php?tid=$1&page=$3",
)[/code]
[url=http://www.pbdigg.net/show.php?tid=29534]http://www.pbdigg.net/show.php?tid=29534[/url]
[size=4][color=red]这贴主要是收集这些规则。
如有什么不明白的,可回贴。。[/color][/size]
页:
[1]