【发布时间】:2016-12-28 19:30:41
【问题描述】:
我正在尝试将https://example.com/user/whatever 下的所有请求重定向到我的“获取我们的应用程序”页面,地址为https://example.com/get_app.html
在我的 nginx.conf 中,我有以下块设置:
#Redirect all requests under /user/ to the "get App" page
location /user/ {
try_files $uri $uri/ /get_app.html;
}
提供了 html 文件,但未显示 css 和图像。只是一个带有我的 html 的纯白页面。如果我只输入example.com/user/whatever,页面就会正确提供。我究竟做错了什么?为什么来自重定向时 nginx 不能正确地提供文件?
【问题讨论】:
标签: html css nginx configuration