typecho的rewrite规则for Nginx

2010/03/20 6:04 下午  |  分类:nginx

typecho在nginx下的rewrite有好多方法,试下来还是这个方便一些!

1
2
3
4
5
6
7
8
9
10
11
12
location / {
        index index.html index.php;
        if (-f $request_filename/index.html){
            rewrite (.*) $1/index.html break;
        }
        if (-f $request_filename/index.php){
            rewrite (.*) $1/index.php;
        }
        if (!-f $request_filename){
            rewrite (.*) /index.php;
        }
    }

全文阅读 »