[已解决]求nginx的rewrite配置

只要实现隐藏index.php的功能即可

http://www.yiiframew…rl#hiding-x-14x

问题已解决,nginx+fastcgi+php方式下隐藏index.php需要注意几个问题

一个是配置PATH_INFO,不然无法使用yii urlManager的path格式

记得加上绿色这行

location ~ .php {     

        fastcgi_pass  127.0.0.1:9000;

        fastcgi_index index.php;

        include fastcgi_params;

    	fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;


&nbsp; &nbsp; 	<span style='color: green'>fastcgi_param PATH_INFO $fastcgi_script_name;</span>


&nbsp; &nbsp; 	access_log off;

  }

还有一个是rewrite规则

location /yiiGuestbook {

            if (!-e $request_filename){

                rewrite (.*) /yiiGuestbook/index.php/$1;

            }

        }

很不错,或许你可以发一个cookbook page?

我也是这么想的 ;D

我英文不好,写了份中文的cookbook:http://www.yiiframework.com/doc/cookbook/15/

我帮你翻成英文了。看来cookbook需要加上不同语言的支持。

非常感谢,我也觉得有必要支持多语言

如果不需要yiiGuestbook 这个目录咋办?