首页  >  问答  >  正文

nginx location 配置问题求解


(1)

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

(2)

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

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

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

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

给我你的怀抱给我你的怀抱2713 天前476

全部回复(1)我来回复

  • 过去多啦不再A梦

    过去多啦不再A梦2017-05-16 17:18:36

    是不是index前少了个斜杠

    回复
    0
  • 取消回复