首页 > 其他 > 详细

nginx支持pathinfo

时间:2017-09-19 13:14:28      阅读:279      评论:0      收藏:0      [点我收藏+]
server {
                root   /webserver/www/api;
                listen       80;
                server_name  api.dnxia.com;

                location / {
                      if (!-e $request_filename)
                        {
                            rewrite "^/(.*)$" /index.php last;
                        }
                }

                location ~\.php{
                         root   /webserver/www/api;
                         index index.php;
                         fastcgi_pass   127.0.0.1:9000;
                         fastcgi_index  index.php;



                         fastcgi_split_path_info  ^(.+\.php)(.*)$;
                        
                         fastcgi_param PATH_INFO $fastcgi_path_info;
                      
                         if (!-e $document_root$fastcgi_script_name) {
                            
                             return 404;
                         }
                         fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
                         include        fastcgi_params;

                }

        }

 

nginx支持pathinfo

原文:http://www.cnblogs.com/norm/p/7550839.html

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!