Revision #8 has been created by blindMoe on Sep 10, 2010, 5:06:48 PM with the memo:
Update for nginx 0.7
« previous (#7) next (#9) »
Changes
Title
unchanged
How to hide index.php on nginx
Category
unchanged
Tutorials
Yii version
unchanged
Tags
unchanged
Content
changed
[...]
}
~~~
Second, we need the following rewrite rule to hide `index.php`:
nginx versions .7 and higher:
~~~
try_files $uri $uri/ /yiiGuestbook/index.php?r=$request_uri;
~~~
nginx versions prior to .7:
~~~
location /yiiGuestbook {
if (!-e $request_filename){[...]
[Russian version](http://dbhelp.ru/nginx-good-urls/page/)
[Chinese version](http://dreamneverfall.cn/node/81)
FYI, it is good practice to have your 'root' declaration outside of the location blocks. Please refer to this article if you are new to nginx:
[nginx-pitfalls] (http://wiki.nginx.org/Pitfalls)