返回列表 发帖

Lighttpd 伪静态规则:Discuz、disucz X、emlog、WordPress、phpwind地址重写规则

相关贴:
kloxo里Apache切换lighttpd方法,切换lighttpd好处。lighttpd设置rewrite伪静态操作





注:以下代规则,有些是未测试,只是收集过来。。

站友自行测试看。




phpwind伪静态规则
  1. url.rewrite = (“^(.*)-htm-(.*)$” => “$1.php?$2″)
复制代码






WordPress伪静态规则
  1. url.rewrite = (
  2. “^/(wp-.+).*/?” => “$0″,
  3. “^/(sitemap.xml)” => “$0″,
  4. “^/(xmlrpc.php)” => “$0″,
  5. “^/(.+)/?$” => “/index.php/$1″
  6. )
复制代码





Bo-Blog伪静态规则
  1. url.rewrite = (
  2. “^(.*)/post/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/read.php?entryid=$2&page=$3&part=$4″,
  3. “^(.*)/page/([0-9]+)/([0-9]+)/?$” => “$1/index.php?mode=$2&page=$3″,
  4. “^(.*)/starred/([0-9]+)/?([0-9]+)?/?$” => “$1/star.php?mode=$2&page=$3″,
  5. “^(.*)/category/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/index.php?go=category_$2&mode=$3&page=$4″,
  6. “^(.*)/archiver/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/index.php?go=archive&cm=$2&cy=$3&mode=$4&page=$5″,
  7. “^(.*)/date/([0-9]+)/([0-9]+)/([0-9]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/index.php?go=showday_$2-$3-$4&mode=$5&page=$6″,
  8. “^(.*)/user/([0-9]+)/?$” => “$1/view.php?go=user_$2″,
  9. “^(.*)/tags/([^/]+)/?([0-9]+)?/?([0-9]+)?/?$” => “$1/tag.php?tag=$2&mode=$3&page=$4″,
  10. “^(.*)/component/id/([0-9]+)/?$” => “$1/page.php?pageid=$2″,
  11. “^(.*)/component/([^/]+)/?$” => “$1/page.php?pagealias=$2″
  12. )
复制代码






emlog3.3.0伪静态规则: (官方使用指南中就有)
  1. url.rewrite-once = (
  2. ”^(.*)/post-([0-9]+).html$”=>”$1/index.php?post=$2″,
  3. ”^(.*)/record-([0-9]+).html$”=>”$1/index.php?record=$2″,
  4. ”^(.*)/tag-(.+).html$”=>”$1/index.php?tag=$2″,
  5. ”^(.*)/page-([0-9]+).html$”=>”$1/index.php?page=$2″,
  6. ”^(.*)/sort-([0-9]+).html$”=>”$1/index.php?sort=$2″
  7. )
复制代码





emlog 4.0.1伪静态规则:
  1. url.rewrite-once = (
  2. "^(.*)/(rss|rb|xmlrpc|install|emlog_toolkit).php(.*)$" => "$1/$2.php$3",
  3. "^(.*)/up(\d.\d.\d)to(\d.\d.\d).php(.*)$" => "$1/up$1to$2.php$3",
  4. "^(.*)/favicon.ico$" => "$1/favicon.ico",
  5. "^(.*)/wlwmanifest.xml$" => "$1/wlwmanifest.xml",
  6. "^(.*)/(admin|content|include|t|m)/(.*)$" => "$1/$2/$3",
  7. "^(.*)/.*$" => "$1/index.php"
  8. )
复制代码




Discuz 伪静态规则:  
  1. url.rewrite-once = (
  2. "^/bbs/archiver/((fid|tid)-[\w\-]+\.html)$" => "bbs/archiver/index.php?$1",
  3. "^/bbs/forum-([0-9]+)-([0-9]+)\.html$" => "bbs/forumdisplay.php?fid=$1&page=$2",
  4. "^/bbs/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "bbs/viewthread.php?tid=$1&extra=page=$3&page=$2",
  5. "^/bbs/space-(username|uid)-(.+)\.html$" => "bbs/space.php?$1=$2",
  6. "^/bbs/tag-(.+)\.html$" => "bbs/tag.php?name=$1"
  7. )
复制代码

(注此规则是在BBS子目录下的论坛,论坛在根目录下请去掉相应的 “bbs/”
  如去掉后,最后一行为:"^/tag-(.+)\.html$" => "tag.php?name=$1"







lightttpd下disucz X 1.0 伪静态规则
  1. url.rewrite-once = (
  2. "^(.*)/topic-(.+)\.html$" => "$1/portal.php?mod=topic&topic=$2&%1",
  3. "^(.*)/article-([0-9]+)-([0-9]+)\.html$" => "$1/portal.php?mod=view&aid=$2&page=$3&%1",
  4. "^(.*)/forum-(\w+)-([0-9]+)\.html$" => "$1/forum.php?mod=forumdisplay&fid=$2&page=$3&%1",
  5. "^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=viewthread&tid=$2&extra=page\%3D$4&page=$3&%1",
  6. "^(.*)/group-([0-9]+)-([0-9]+)\.html$" => "$1/forum.php?mod=group&fid=$2&page=$3&%1",
  7. "^(.*)/space-(username|uid)-(.+)\.html$" => "$1/home.php?mod=space&$2=$3&%1",
  8. "^(.*)/([a-z]+)-(.+)\.html$" => "$1/$2.php?rewrite=$3&%1",
  9. )
复制代码






lightttpd下disucz X 2.0 伪静态规则 :  (注,有的说1.5版也一样)
  1. url.rewrite-once = (
  2. "^/topic-(.+)\.html$" => "/portal.php?mod=topic&topic=$1&$2",
  3. "^/article-([0-9]+)-([0-9]+)\.html$" => "/portal.php?mod=view&aid=$1&page=$2&$3",
  4. "^/forum-(\w+)-([0-9]+)\.html$" => "/forum.php?mod=forumdisplay&fid=$1&page=$2&$3",
  5. "^/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$" => "/forum.php?mod=viewthread&tid=$1&extra=page%3D$3&page=$2&$4",
  6. "^/group-([0-9]+)-([0-9]+)\.html$" => "/forum.php?mod=group&fid=$1&page=$2&$3",
  7. "^/space-(username|uid)-(.+)\.html$" => "/home.php?mod=space&$1=$2&$3",
  8. "^/blog-([0-9]+)-([0-9]+)\.html$" => "/home.php?mod=space&uid=$2&do=blog&page=$2&$3",
  9. "^/archiver-(fid|tid)-([0-9]+)\.html$" => "/archiver/index.php?action=$1&page=$2&%3",
  10. "^/([a-z]+)-(.+)\.html$" => "/$1.php?rewrite=$2&$3"
  11. )
复制代码

注意:这DX2规则未测试,贴主说这规则有两条不能用。注意去看来源贴。
可参考一下这贴:http://www.discuz.net/thread-2202910-1-1.html  具体未测试





----------------------------------------------相关贴:

emlog 4.0.1 lighttpd 伪静态规则 重写规则 emlog 3.5 lighttpd 伪静态规
分享到: QQ空间QQ空间 腾讯微博腾讯微博 腾讯朋友腾讯朋友
★ 11月开空间新规则,百度GG收录百贴:http://idc866.com/thread-15155-1-1.html
★ 本站转型:推荐免费空间,收集免费空间,免费空间测试,并提供原创申请教程。
★ 免备案空间,免费空间,免费国外空间,国外免费空间,免费美国空间
★ 我们是一群辛勤的小站站长,我们需要团结,我们需要共同进步!!!!
★ 达要求开空间,论坛发申请贴后,请加QQ:876812422  (一般在线、有Q必回)

其它程序收集:

lighttpd 的ecshop伪静态规则   (注意:这是在子目录/soarb/下,如根目录请把他换成/)
  1. url.rewrite = (
  2. "^/soarb/index.html$" => "/soarb/index.php",
  3. "^/soarb/category$" => "/soarb/index.php",
  4. "^/soarb/feed-c([0-9]+).xml$" => "/soarb/feed.php?cat=$1",
  5. "^/soarb/feed-b([0-9]+).xml$" => "/soarb/feed.php?brand=$1",
  6. "^/soarb/feed-type([^-]+).xml$" => "/soarb/feed.php?type=$1",
  7. "^/soarb/feed.xml$" => "/soarb/feed.php",
  8. "^/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",
  9. "^/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",
  10. "^/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",
  11. "^/soarb/category-([0-9]+)-b([0-9]+)-([0-9]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2&page=$3",
  12. "^/soarb/category-([0-9]+)-b([0-9]+)(.*).html$" => "/soarb/category.php?id=$1&brand=$2",
  13. "^/soarb/category-([0-9]+)(.*).html$" => "/soarb/category.php?id=$1",
  14. "^/soarb/goods-([0-9]+)(.*).html$" => "/soarb/goods.php?id=$1",
  15. "^/soarb/article_cat-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/article_cat.php?id=$1&page=$2&sort=$3&order=$4",
  16. "^/soarb/article_cat-([0-9]+)-([0-9]+)(.*).html$" => "/soarb/article_cat.php?id=$1&page=$2",
  17. "^/soarb/article_cat-([0-9]+)(.*).html$" => "/soarb/article_cat.php?id=$1",
  18. "^/soarb/article-([0-9]+)(.*).html$" => "/soarb/article.php?id=$1",
  19. "^/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",
  20. "^/soarb/brand-([0-9]+)-c([0-9]+)-([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1&cat=$2&page=$3",
  21. "^/soarb/brand-([0-9]+)-c([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1&cat=$2",
  22. "^/soarb/brand-([0-9]+)(.*).html$" => "/soarb/brand.php?id=$1",
  23. "^/soarb/tag-(.*).html$" => "/soarb/search.php?keywords=$1",
  24. "^/soarb/snatch-([0-9]+).html$" => "/soarb/snatch.php?id=$1",
  25. "^/soarb/group_buy-([0-9]+).html$" => "/soarb/group_buy.php?act=view&id=$1",
  26. "^/soarb/auction-([0-9]+).html$" => "/soarb/auction.php?act=view&id=$1",
  27. "^/soarb/exchange-id([0-9]+)(.*).html$" => "/soarb/exchange.php?id=$1&act=view",
  28. "^/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",
  29. "^/soarb/exchange-([0-9]+)-([0-9]+)-(.+)-([a-zA-Z]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&page=$2&sort=$3&order=$4",
  30. "^/soarb/exchange-([0-9]+)-([0-9]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1&page=$2",
  31. "^/soarb/exchange-([0-9]+)(.*).html$" => "/soarb/exchange.php?cat_id=$1"
  32. )
复制代码

来源:http://bbs.ecshop.com/thread-102600-1-1.html








pbdigg   Lighttpd 伪静态规则:
  1. url.rewrite-once = (
  2. "^/index\.html(&page=([0-9]+))?$" => "/index\.php?page=$2",
  3. "^/category/([0-9]+)(&page=([0-9]+))?$" => "/category\.php?cid=$1&page=$3",
  4. "^/user/([0-9]+)(&page=([0-9]+))?$" => "/user\.php?uid=$1&page=$3",
  5. "^/show/([0-9]+)\.html(&page=([0-9]+))?$" => "/show\.php?tid=$1&page=$3",
  6. )
复制代码

http://www.pbdigg.net/show.php?tid=29534





这贴主要是收集这些规则。

如有什么不明白的,可回贴。。
★ 11月开空间新规则,百度GG收录百贴:http://idc866.com/thread-15155-1-1.html
★ 本站转型:推荐免费空间,收集免费空间,免费空间测试,并提供原创申请教程。
★ 免备案空间,免费空间,免费国外空间,国外免费空间,免费美国空间
★ 我们是一群辛勤的小站站长,我们需要团结,我们需要共同进步!!!!
★ 达要求开空间,论坛发申请贴后,请加QQ:876812422  (一般在线、有Q必回)

TOP

返回列表