nginx重写不知为什么死循环
rewrite ^/(.*)  /index.php/$1 last;
/index.php/index.php/index.php/index.php/index.php/index.php/index.php/index.php/Index
后来我改成查询字符串就解决了。
location / {
            index index.php index.html index.htm;
            if (!-e $request_filename){ 
               rewrite ^/(.*)$ /index.php?_path_info=/$1 last;
            } 
        }
在index.php中,把query string "_path_info" 放到$_SERVER变量中。
<?php
ini_set("display_errors",true);
error_reporting(E_ALL|E_ERROR);
$_SERVER['PATH_INFO']=@$_GET['_path_info']; define("APPLICATION_PATH",dirname(__DIR__));
$app = new Yaf\Application(APPLICATION_PATH.'/conf/application.ini');
$app->bootstrap()->run();
?>