nginx location 配置问题求解
本文介绍了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)我感觉都是一样的,只是写法不同而已,为什么结果不同??? 在线等
解决方案
是不是index前少了个斜杠
这篇关于nginx location 配置问题求解的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文