Score:0

Nginx Redict without modifying url

ec flag

I want to make a redirection from one domain to another but from one page only.

Example: https://domainA.com/site/page to https://domainB.com/site/page

In nginx I put:

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

and it works, it does the rediction, but it changes the url and I want the url to always be https://domainA.com/site/page

How can I do so that the url does not change?

thank you!

ec flag
It's not the same domain, it's different.
ec flag
I found the solution with "proxy_ssl_server_name on;"
Score:0
ec flag

The solution:

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

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.