如何给API接口的URL上增加版本号?

问题描述

Nginx配置失败咯
图片描述

系统环境
Nginx
PHP7
Thinkphp5

目前结构目录

图片描述

希望最终的请求如下:

  1. api.JhouShuai.com/3.0.0/ucenter/profile ---->api.JhouShuai.com/V300/ucenter/profile

2.api.JhouShuai.com/3.0.1/ucenter/profile ---->api.JhouShuai.com/V301/ucenter/profile

阅读 2.3k
撰写回答
你尚未登录,登录后可以
  • 和开发者交流问题的细节
  • 关注并接收问题和回答的更新提醒
  • 参与内容的编辑和改进,让解决方法与时俱进
推荐问题