Because your nginx configuration is to intercept access To the. php file suffix and forward to the PHP-CGI, and index. php and index. php/are different .. In nginx, you write the following statement:
If (! -E $ request_filename) {rewrite ^. * $/index. php last ;}
// Solve the problem,
Nginx does not support the path_info mode by default. You need to modify the nginx configuration so that nginx can parse the index. PHP/controller/F: # ciserver {Listen 80; SERVER_NAME www.ci.com; Index. PHP index.html index.htm; root "/servers/apps/CI"; location ~ \. PHP {fastcgi_pass 127.0.0.1: 9000; fastcgi_index index. PHP; ######################################## # pathinfo mode set $ path_info ""; set $ real_script_name $ fastcgi_script_name; if ($ fastcgi_script_name ~ "^ (. +? \. PHP )(/. +) $ ") {set $ real_script_name $1; set $ path_info $2;} include FastCGI. conf; fastcgi_param script_filename $ document_root $ real_script_name; fastcgi_param script_name $ real_script_name; fastcgi_param path_info $ path_info; ######################################## # key points of nginx support for pathinfo mode }}
How to solve the 404 error of Ci in nginx