CI框架在nginx下的伪静态规则配置

CI框架在NGINX下的伪静态规则修改:

1、location

location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
break;
}
}

2、location ~ [^/]\.php(/|$)

location ~ [^/]\.php(/|$) {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;

#增加以下两行
fastcgi_split_path_info ^(.+\.php)(.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;

include fastcgi.conf;
}