jxyblog

jxyblog

email

網上找到的能用的lighttpd偽靜態,實在是因為lighttpd太少人用了

網上找了好久,具體規則我也編寫不來,英文文檔看不懂。
下面我就把規則貼出來,目前我用的是最簡單的那個規則。
我還找到了 lighttpd 的 Mod_rewrite 的 WIKI,全英文的看不懂,留著備用
鏈接:Mod_rewrite

url.rewrite-if-not-file = (
"^/(admin|usr)/(.*)" => "/$1/$2",
"^/(.*)$" => "/index.php/$1"
)
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 = (
"^/(admin|usr)/(.*)" => "/$1/$2",
"^/(.*).html$" => "/index.php/$1.html",
"^/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"
)
載入中......
此文章數據所有權由區塊鏈加密技術和智能合約保障僅歸創作者所有。