Difference between #7 and #8 of
How to hide index.php on nginx

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)
 
 
4 0
12 followers
Viewed: 95 316 times
Version: 1.1
Category: Tutorials
Tags: URL
Written by: miles
Last updated by: Darwin Wen
Created on: Feb 20, 2009
Last updated: 13 years ago
Update Article

Revisions

View all history