32MB.CN

Typecho Lighttpd Rewrite Rules
If you are using Typecho with Lighttpd, you will need to ...
扫描右侧二维码阅读全文
22
2015/08

Typecho Lighttpd Rewrite Rules

If you are using Typecho with Lighttpd, you will need to setup Lighttpd specific rewrite rules.
First.Add these rules to virtual host configuration files.

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"
)

Then,visit your_domain/admin/options-permalink.php ,change Permalink Settings to Custom Structure

/archives/{cid}.html

Last modification:August 22nd, 2015 at 09:32 pm
If you think my article is useful to you, please feel free to appreciate

2 comments

  1. BlueIce

    博主您好 请教一下 typecho使用您的伪静态规则后 后台管理评论无法删除,phpmyadmin访问“typecho_comments”表提示404 关闭规则后正常 请问是什么原因呢

    1. 32MB.CN
      @BlueIce

      测试了一下没问题啊,我的Te版本是1.0 (14.10.10)。

Leave a Comment