nginx 支持pathinfo的配置文件

location ~ \.php {
              fastcgi_pass   127.0.0.1:9000;
              fastcgi_index  index.php;
              include        fastcgi_params;
              set $path_info "";
              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;
        }
或者
location ~ \.php(.*)$ {
              fastcgi_read_timeout 1200;
              fastcgi_pass   127.0.0.1:9000;
              fastcgi_index  index.php;
              fastcgi_split_path_info  ^((?U).+\.php)(/?.+)$;
              fastcgi_param  SCRIPT_FILENAME  $document_root$fastcgi_script_name;
              fastcgi_param  PATH_INFO  $fastcgi_path_info;
              fastcgi_param  PATH_TRANSLATED  $document_root$fastcgi_path_info;
              include        fastcgi_params;
        }
上一篇:Android设计模式系列--模板方法模式


下一篇:dataStructure@ Find if there is a path between two vertices in a directed graph