我在尝试使用同一服务器为两个不同的网站提供服务时遇到了问题。
我在timothylim.is的根目录下有一个登录页面,在timothylim.is/writing上还有一个单独的博客。
我有以下两个不同位置的nginx配置:
location / {
rewrite ^/pserver(/.*)$ $1 break;
proxy_pass https://timothyylim.github.io/landing-page/;
}
location /writing {
rewrite ^/pserver(/.*)$ $1 break;
proxy_pass https://timothyylim.github.io/writing-online/;
}但是,当在“/writing”位置单击任何链接时,浏览器将导航到timothylim.is/poetry/your-pillar/而不是timothylim.is/writing/poetry/your-pillar/。
有没有办法重定向到主域上的子文件夹?
发布于 2018-09-25 05:05:47
您可以使用基本的meta标记,而不是尝试更改服务器行为。
<base href="timothylim.is/writing/">https://stackoverflow.com/questions/52487345
复制相似问题