访问/abc/sitemap.xml时,我想在不更改网址的情况下显示/abc/sitemap?output=xml
的内容。
目前,它显示正确的内容,但将URL更改为/ abc / sitemap?output = xml而不是保留/abc/sitemap.xml,这是我的配置。
location /abc/sitemap.xml {
rewrite ^ /abc/sitemap?output=xml;
}
谢谢
怎么样的proxy_pass
:
location /abc/sitemap.xml {
proxy_pass http://$host/abc/sitemap?output=xml;
}
注意:根据您的SSL配置,使用HTTP
或HTTPS
。