标签:rewrite list ast cat html class fastcgi nbsp index.php
server {
listen 8080;
server_name localhost;
root /Applications/thinkphp/;
location ~ \.php {
root /Applications/thinkphp/;
fastcgi_pass 127.0.0.1:9000;
include fastcgi.conf;
set $path_info "";
set $fastcgi_script_name_new $fastcgi_script_name;
if ($fastcgi_script_name ~* "^(.+\.php)(/.+)$" ) {
set $fastcgi_script_name_new $1;
set $path_info $2;
}
fastcgi_param SCRIPT_FILENAME $document_root$fastcgi_script_name_new;
fastcgi_param SCRIPT_NAME $fastcgi_script_name_new;
fastcgi_param PATH_INFO $path_info;
}
location / {
index index.html index.htm index.php;
include /usr/local/etc/nginx/conf.d/php-fpm;
if (!-e $request_filename){
rewrite ^(.*)$ /index.php$1 last;
}
}
}
标签:rewrite list ast cat html class fastcgi nbsp index.php
原文地址:http://www.cnblogs.com/best-jobs/p/6821075.html