主页 » Lighttpd » usebb的lighttpd地址重写规则rewrite规则

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

十月 6th, 2011 Lighttpd

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规则





标签/关键词 » ,

与“usebb的lighttpd地址重写规则rewrite规则”相关的推荐阅读内容

什么是ECMAScript 6?什么是ES6?

2014年6月24日
ECMAScript 6(以下简称ES6)是JavaScript语言的下一代标准,正处在快速开发之中,大部分已 ...

新版NFS服务器搭建及客户机挂载教程&centos6.5下NFS系统搭建

2015年8月31日
以下主机环境均为centos 6.5 32bit 服务器NFS ip 192.168.1.1 客户端主机A i ...

lighttpd服务器防盗链配置方法详解

2015年6月9日
编辑lighttpd服务器防盗链配置文件 vi /etc/lighttpd/lighttpd.conf 加入以 ...

点击率最高、效果最好的广告尺寸和位置

2014年5月14日
300×250也叫做“中矩形广告”。往往能够吸引更多来自广告客户的广告资源,同时启用文字广告和图片广 ...