nginx得到参数,转发到另一个地址

  • 原地址格式
    在这里插入图片描述
  • 想要转化的地址,把手机号换成路径
 http://xxx/api/hhp/userInterface/consultingAppointment/verificationCode/xxxx
  • nginx配置,$arg_phonephone就是后面的参数
   location = /api/hhp/userInterface/consultingAppointment/verificationCode {
       proxy_pass http://xxx/api/hhp/userInterface/consultingAppointment/verificationCode/$arg_phone;
    }

posted on 2021-07-27 19:27  愤怒的苹果ext  阅读(660)  评论(0编辑  收藏  举报

导航