nginx得到参数,转发到另一个地址
- 原地址格式
- 想要转化的地址,把手机号换成路径
http://xxx/api/hhp/userInterface/consultingAppointment/verificationCode/xxxx
- nginx配置,
$arg_phone
phone就是后面的参数
location = /api/hhp/userInterface/consultingAppointment/verificationCode {
proxy_pass http://xxx/api/hhp/userInterface/consultingAppointment/verificationCode/$arg_phone;
}