erver
{
listen 80;
server_name cy.280878.com;
root /home/www/cy.280878.com;
index index.php index1.php index.htm index.html;
location / {
if (!-e $request_filename) {
rewrite ^(.*)$ /index.php?s=/$1 last;
break;
}
}
location ~ .*\.php$
{
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
fastcgi_split_path_info ^(.+\.php)(/.*)$;
fastcgi_param PATH_INFO $fastcgi_path_info;
fastcgi_param sc
include /etc/nginx/fastcgi_params;
}
}
.htaccess
<IfModule mod_rewrite.c>
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/?$1 [QSA,PT,L]
</IfModule>
conf
// 兼容PATH_INFO获取
'pathinfo_fetch' => ['ORIG_PATH_INFO', 'REDIRECT_PATH_INFO', 'REDIRECT_URL'],
百度各种资料有的说是不支持path_info,有的说服务器配置可是我的都做了配置还是不行,只能显示首页,其他打开都是file not found...
最佳答案