这应该很容易做到,但我的头撞在墙上了。如果我收到对 www.mysite.com/mypath 的请求,我想提供 www.mysite.com/myotherpath/thisfile.html 的内容。我如何使用 nginx 配置来做到这一点。
location = /mypath {
try_files /myotherpath/thisfile.html =404;
}
- http://nginx.org/r/try_files http://nginx.org/r/try_files
- http://nginx.org/r/location http://nginx.org/r/location
本文内容由网友自发贡献,版权归原作者所有,本站不承担相应法律责任。如您发现有涉嫌抄袭侵权的内容,请联系:hwhale#tublm.com(使用前将#替换为@)