2010年9月12日星期日

[linux][code]typecho的rewrite规则for 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;          }      }


转自武眉博!参考:http://www.weijingtai.com/2010/03/20/typecho-rewrite-for-nginx/

 

没有评论:

发表评论