nginx location 配置问题求解


(1)

 if ($fastcgi_script_name ~ "^(.+\.php)(/.+)$"){
    set $path_info $2;
 }

(2)

  if ($fastcgi_script_name ~ "^index.php/(.+)$"){
    set $path_info $1;
 }

访问地址 test.com/index.php/oss/index

(1) $2 = /oss/index
(2) $1 没有任何数据

(1)(2)我感觉都是一样的,只是写法不同而已,为什么结果不同??? 在线等

阅读 2.1k
1 个回答

是不是index前少了个斜杠

推荐问题