location ~ .*\.(php|php5)?$
{
fastcgi_pass unix:/tmp/php-cgi.sock;
#fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fcgi.conf;
}
location / {
if (!-e $request_filename) {
rewrite ^/(.*)$ /index.php/$1 last;
}
}
location ~ .php$ {
fastcgi_pass unix:/tmp/php-cgi.sock;
fastcgi_index index.php;
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name;
include fastcgi_params;
}
location ~ \.php($|/) {
set $script $uri;
set $path_info "";
if ($uri ~ "^(.+\.php)(/.+)") {
set $script $1;
set $path_info $2;
}

原帖由 qwe123 于 2009-12-17 14:06 发表
你用的框架吧? fleaphp thinkphp 还是codeigniter?或cake 、zend framework ? 里面应该有设置的,可以启用request_uri或其它方式,不一定非得pathinfo啊。
| 欢迎光临 全球主机交流论坛 (https://fd.vvwvv.eu.org/) | Powered by Discuz! X3.4 |