码迷,mamicode.com
首页 > Web开发 > 详细

nginx 支持thinkphp pathinfo模式

时间:2015-03-11 15:01:49      阅读:107      评论:0      收藏:0      [点我收藏+]

标签:nginx


server {
listen  80;
server_name     apply.lalagome.cn;
root /usr/local/www/gome;
error_page  404 500 502 503 504  /50x.html;
index index.html index.htm index.php ;
location / {
        index  index.php;
        if (!-e $request_filename) {
        rewrite  ^/(.*)$  /index.php/$1  last;
        break;
        }
}
location ~ \.php {
fastcgi_pass 127.0.0.1:9000;
fastcgi_index index.php;
include fastcgi_params;
set $real_script_name $fastcgi_script_name;
    if ($fastcgi_script_name ~ "^(.+?\.php)(/.+)$") {
    set $real_script_name $1;
    set $path_info $2;
        }
fastcgi_param SCRIPT_FILENAME $document_root$real_script_name;
fastcgi_param SCRIPT_NAME $real_script_name;
fastcgi_param PATH_INFO $path_info;
        }

本文出自 “8767495” 博客,请务必保留此出处http://8777495.blog.51cto.com/8767495/1619324

nginx 支持thinkphp pathinfo模式

标签:nginx

原文地址:http://8777495.blog.51cto.com/8767495/1619324

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!