Created
June 24, 2015 06:01
-
-
Save gongpeione/3b70c8084e3029838f11 to your computer and use it in GitHub Desktop.
solve codeigniter 404 error in Nginx
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
##########################################pathinfo 模式 | |
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; | |
##########################################nginx支持pathinfo 模式的重点 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment