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

配置nginx1.8支持thinkPHP3.2 pathinfo模式

时间:2016-01-24 16:44:33      阅读:135      评论:0      收藏:0      [点我收藏+]

标签:

  nginx 下conf/nginx.conf 或者自己的vhosts
更改以前的参数

location / {

            root   html;

            index  index.html index.htm index.php;

            try_files  $uri  /index.php$uri;

            if (!-e $request_filename) {

                   rewrite ^/子目录名/(.*)$ /子目录名/index.php?s=$1 last; #去除index.php

                   break;

              }

        }

 

location ~ .+\.php($|/) {

            root           html;

            fastcgi_pass   127.0.0.1:9000;

            fastcgi_index  index.php;

            fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;

            fastcgi_split_path_info  ^(.+\.php)(/.*)$;

            fastcgi_param  PATH_INFO $fastcgi_path_info;

            include        fastcgi_params;

        }

配置nginx1.8支持thinkPHP3.2 pathinfo模式

标签:

原文地址:http://www.cnblogs.com/already/p/5155280.html

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