Typecho伪静态规则大全


Typecho是一款由国人开发的程序,深受人们喜欢,常被用于搭建个人博客使用。在网站使用中,伪静态的配置是必不可少的,下面我就分享下我所收集的Typecho伪静态规则,用来给大家参考。

Apache

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteBase /
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]
</IfModule>

Nginx

if (!-e $request_filename) {
    rewrite ^(.*)$ /index.php$1 last;
}

IIS

[ISAPI_Rewrite]
CacheClockRate 3600
RepeatLimit 32
RewriteRule /tag/(.*) /index\.php\?tag=$1
RewriteRule /sitemap.xml /sitemap.xml [L]
RewriteRule /favicon.ico /favicon.ico [L]
RewriteRule /(.*).html /index.php/$1.html [L]
RewriteRule /(.*)/comment /index.php/$1/comment [L]
RewriteRule /category/(.*) /index.php/category/$1 [L]
RewriteRule /page/(.*) /index.php/page/$1 [L]
RewriteRule /search/(.*) /index.php/search/$1 [L]
RewriteRule /feed/(.*) /index.php/feed/$1 [L]
RewriteRule /2(.*) /index.php/2$1 [L]
RewriteRule /action(.*) /index.php/action$1 [L]

声明:极客角度|版权所有,违者必究|如未注明,均为原创|本网站采用BY-NC-SA协议进行授权

转载:转载请注明原文链接 - Typecho伪静态规则大全


拒绝拖延,勇于表达!