usebb的lighttpd地址重写规则rewrite规则

最近帮人安装了一个usebb论坛,这个论坛前端的代码其实很对google的胃口,上线很快就被google收录,而且排名很好,由于这个朋友用的是小内存VPS安装的kolox面板,lighttpd下的usebb重写规则发出来给大家分享。

usebb是一款开源而且高速的论坛程序,而且非常适合小型论坛使用,配合lighttpd服务器做论坛速度超级快.

rewrite重写规则如下(for usebb):

注意:以下规则适用于程序安装在域名根目录的情况(非根目录安装请接着看(二))

(一)程序安装于根目录

url.rewrite = (
“/(index|panel|faq|search|active|online|members|rss|stats).html?[.,;-]?$” => “/$1.php”,
“/index-([0-9]+).html?[.,;-]?$” => “/index.php?cat=$1″,
“/panel-(login|logout|register|sendpwd|editprofile|editoptions|editpwd|subscriptions).html?[.,;-]?$” => “/panel.php?act=$1″,
“/panel-al(0|1).html?[.,;-]?$” => “/panel.php?al=$1″,
“/panel-activate-([0-9]+)-([0-9a-zA-Z]+).html?[.,;-]?$” => “/panel.php?act=activate&id=$1&key=$2″,
“/panel-markallasread.html?[.,;-]?$” => “/panel.php?do=markallasread”,
“/(forum|topic|profile|mail)-([0-9]+).html?[.,;-]?$” => “/$1.php?id=$2″,
“/(forum|topic)-([0-9]+)-([0-9]+).html?[.,;-]?$” => “/$1.php?id=$2&page=$3″,
“/topic-([0-9]+)-((un)?subscribe).html?[.,;-]?$” => “/topic.php?id=$1&act=$2″,
“/topic-([0-9]+)-getnewpost.html?[.,;-]?$” => “/topic.php?id=$1&act=getnewpost”,
“/topic-post([0-9]+).html?[.,;-]?$” => “/topic.php?post=$1″,
“/post-(forum|topic)([0-9]+).html?[.,;-]?$” => “/post.php?$1=$2″,
“/post-topic([0-9]+)-quotepost([0-9]+).html?[.,;-]?$” => “/post.php?topic=$1&quotepost=$2″,
“/edit-post([0-9]+).html?[.,;-]?$” => “/edit.php?post=$1″,
“/edit-post([0-9]+)-delete.html?[.,;-]?$” => “/edit.php?post=$1&act=delete”,
“/edit-topic([0-9]+)-(delete|trash|move|lock|sticky|unlock|unsticky).html?[.,;-]?$” => “/edit.php?topic=$1&act=$2″,
“/online-([0-9]+).html?[.,;-]?$” => “/online.php?page=$1″,
“/members-staff.html?[.,;-]?$” => “/members.php?act=staff”,
“/faq-([0-9a-zA-Z]{5}).html?[.,;-]?$” => “/faq.php?q=$1″,
“/search-results.html?[.,;-]?$” => “/search.php?act=results”,
“/search-results-([0-9]+).html?[.,;-]?$” => “/search.php?act=results&page=$1″,
“/rss.xml[.,;-]?$” => “/rss.php”
)



(二)程序安装于非根目录(请将/UseBB替换为你的目录名称)

url.rewrite = (
“/UseBB/(index|panel|faq|search|active|online|members|rss|stats).html?[.,;-]?$” => “/UseBB/$1.php”,
“/UseBB/index-([0-9]+).html?[.,;-]?$” => “/UseBB/index.php?cat=$1″,
“/UseBB/panel-(login|logout|register|sendpwd|editprofile|editoptions|editpwd|subscriptions).html?[.,;-]?$” => “/UseBB/panel.php?act=$1″,
“/UseBB/panel-al(0|1).html?[.,;-]?$” => “/UseBB/panel.php?al=$1″,
“/UseBB/panel-activate-([0-9]+)-([0-9a-zA-Z]+).html?[.,;-]?$” => “/UseBB/panel.php?act=activate&id=$1&key=$2″,
“/UseBB/panel-markallasread.html?[.,;-]?$” => “/UseBB/panel.php?do=markallasread”,
“/UseBB/(forum|topic|profile|mail)-([0-9]+).html?[.,;-]?$” => “/UseBB/$1.php?id=$2″,
“/UseBB/(forum|topic)-([0-9]+)-([0-9]+).html?[.,;-]?$” => “/UseBB/$1.php?id=$2&page=$3″,
“/UseBB/topic-([0-9]+)-((un)?subscribe).html?[.,;-]?$” => “/UseBB/topic.php?id=$1&act=$2″,
“/UseBB/topic-([0-9]+)-getnewpost.html?[.,;-]?$” => “/UseBB/topic.php?id=$1&act=getnewpost”,
“/UseBB/topic-post([0-9]+).html?[.,;-]?$” => “/UseBB/topic.php?post=$1″,
“/UseBB/post-(forum|topic)([0-9]+).html?[.,;-]?$” => “/UseBB/post.php?$1=$2″,
“/UseBB/post-topic([0-9]+)-quotepost([0-9]+).html?[.,;-]?$” => “/UseBB/post.php?topic=$1&quotepost=$2″,
“/UseBB/edit-post([0-9]+).html?[.,;-]?$” => “/UseBB/edit.php?post=$1″,
“/UseBB/edit-post([0-9]+)-delete.html?[.,;-]?$” => “/UseBB/edit.php?post=$1&act=delete”,
“/UseBB/edit-topic([0-9]+)-(delete|trash|move|lock|sticky|unlock|unsticky).html?[.,;-]?$” => “/UseBB/edit.php?topic=$1&act=$2″,
“/UseBB/online-([0-9]+).html?[.,;-]?$” => “/UseBB/online.php?page=$1″,
“/UseBB/members-staff.html?[.,;-]?$” => “/UseBB/members.php?act=staff”,
“/UseBB/faq-([0-9a-zA-Z]{5}).html?[.,;-]?$” => “/UseBB/faq.php?q=$1″,
“/UseBB/search-results.html?[.,;-]?$” => “/UseBB/search.php?act=results”,
“/UseBB/search-results-([0-9]+).html?[.,;-]?$” => “/UseBB/search.php?act=results&page=$1″,
“/UseBB/rss.xml[.,;-]?$” => “/UseBB/rss.php”
)


原文地址:usebb的lighttpd地址重写规则rewrite规则

转载于:https://my.oschina.net/xiaohostcom/blog/188716

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值