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 ---------------------------------------------------------------------
Your current IP address is: 100.24.113.182
Your IP address location: 美国 弗吉尼亚州阿什本amazon数据中心 其它参考数据(埃文科技提供)
Your IP address country and region: 美国 美国
Your current browser is:
Your current system is:
Original content, please indicate the source:
同福客栈论坛 | 蟒蛇科普海南乡情论坛 | JiaYu Blog
sicnature ---------------------------------------------------------------------
Welcome to reprint. Please indicate the source https://www.myzhenai.com.cn/post/3209.html

1 评论

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

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

发表评论

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