Difference between #3 and #4 of
How to hide index.php on nginx

Revision #4 has been created by qiang on Feb 20, 2009, 2:31:38 AM with the memo:

Translated to English
« previous (#3) next (#5) »

Changes

Title changed

Nginx hHiding index.php on nginx

Category unchanged

Tutorials

Yii version unchanged

Tags unchanged

Content changed

nginx+fastcgi+php方式下隐藏index.php需要注意几个问题
 
 
一个是配置PATH_INFO,不然无法使用yii urlManager的path格式
 
记得加上"fastcgi_param PATH_INFO $fastcgi_script_name;
 
"这行
 
 
```php
In order to use `path` URL format and hide index.php on nginx+fastcgi+php, we need the following configurations.
 
 
First, we need to add PATH_INFO to the server configuration. Otherwise, we will not be able to use `path` URL format in Yii:
 
 
~~~

location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
[...]
access_log off;
}
```~~~ 还有一个是rewrite规则
 
 
```php
Second, we need the following rewrite rule to hide `index.php`:
 
 
~~~

location /yiiGuestbook {
if (!-e $request_filename){
[...]
}
}
```~~~ [Apache hiding index.php请看这里Please refer to [the Guide](http://www.yiiframework.com/doc/guide/topics.url) for hiding `index.php` on Apache httpd server.
4 0
12 followers
Viewed: 95 332 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