URL을 수정하지 않고 Nginx Redict

URL을 수정하지 않고 Nginx Redict

한 도메인에서 다른 도메인으로 리디렉션을 만들고 싶지만 한 페이지에서만 가능합니다.

예: https://domainA.com/site/page에게https://domainB.com/site/page

nginx에는 다음을 넣었습니다.

location /site {
         rewrite ^/site/page https://domainB.com/site/page break;
}

작동하고, 재편집을 수행하지만 URL이 변경되고 URL이 항상 유지되기를 원합니다.https://domainA.com/site/page

URL이 변경되지 않게 하려면 어떻게 해야 하나요?

감사합니다!

답변1

해결책:

location /site/ {
         proxy_ssl_server_name on;
         proxy_pass https://domainB.com/site/page;
}

관련 정보