lighttpd伪静态规则

2020年03月31日

这是hostloc社区上的圈圈教的方法,还有就是参考了其他博客的方法,这里做个记录。
WordPress

server.error-handler-404 = "/index.php?error=404" 

 
连着url.rewrite = ( )一起替换掉

TypeCho

url.rewrite-if-not-file = ("^/(.*).htm$" => "/index.php/$1.htm", "^/archives/(.*)" => "/index.php/archives/$1", "^/category/(.*)" => "/index.php/category/$1", "^/([0-9]+)/([0-9]+)/$" => "/index.php/$1/$2/", "^/tag/(.*)/$" => "/index.php/tag/$1", "^/search/(.*)/$" => "/index.php/search/$1", "^/(.*)page/(.*)" => "/index.php/$1page/$2", "^/(feed.*)" => "/index.php/$1", "^/action/(.*)" => "/index.php/action/$1","^/(.*)comment" => "/index.php/$1/comment)

 

url.rewrite-if-not-file = (
"^/(admin|usr)/(.*)" => "/$1/$2",
"^/(.*)$" => "/index.php/$1"
)

 

discuz

$HTTP["host"] =~ “^www\.hostloc\.com$” {
url.rewrite-once = (
“^(.*)/archiver/([a-z0-9\-]+\.html)$” => “$1/archiver/index.php?$2″,
“^(.*)/forum-([0-9]+)-([0-9]+)\.html$” => “$1/forumdisplay.php?fid=$2&page=$3″,
“^(.*)/thread-([0-9]+)-([0-9]+)-([0-9]+)\.html$” => “$1/viewthread.php?tid=$2&extra=page\%3D$4&page=$3″,
“^(.*)/profile-(username|uid)-(.+)\.html$” => “$1/viewpro.php?$2=$3″
)
}

 


sicnature ---------------------------------------------------------------------
I P 地 址: 18.224.43.74
区 域 位 置: 美国俄亥俄
系 统 信 息: 美国
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source https://myzhenai.com.cn/post/3209.html

1 评论

  • 海南胡说 2020年03月31日在1:42 下午

    官方:https://redmine.lighttpd.net/boards/2/topics/3157

发表回复

您的电子邮箱地址不会被公开。 必填项已用 * 标注