nginx - 如何从 nginx 中的文件映射/重写多个源和目标 URL?
问题描述
档案ABC
sample/xyz/xyz/ should map to /abc/abc/
sample/foo/foo/ should map to /bar/bar/
nginx.conf
include ABC
location sample/ {
local url = ngx.var.uri #(uri = sample/xyz/xyz/)
######## Do something here so that variable url value is changed based on the value in File ABC########
url = /abc/abc/ #(change URI after lookup from file ABC)
}
解决方案
推荐阅读
- html - 多行flexbox,容器宽度只有一列
- solidity - 在 Remix ide 上部署 Solidity 问题
- javascript - 如果配置了 scrollablePlotArea,则在图表图例中显示复选框效果不佳
- android - Android BottomNavigationView 对 SlidingUpPanelLayout mouvements 做出反应
- python - 使用 mayavi mlab.points3d 制作动画
- c# - 使用 Func 参数化的 C# ThreadStart
- perl - 读取文件后多余的符号
- javascript - React Native 图书动画
- python - 有什么方法可以在不使用 Python 中的可执行文件的情况下抓取 JS 渲染页面?
- css - React Native 中的动画字段宽度