My client requires to combine all his ventures into one umbrella without moving them from their original locations. For example, he already has a site running as realestate.com and movers.com and now he wants to combine them under corporate.com such that corporate.com/real link will map to real.corporate.com and shows the website hosted at realestate.com. This is not a redirection so the URL bar will show the real.corporate.com for realestate.com and all the links will also be relative e.g. realestate.com/index.html will show as real.corporate.com/index.html. realestate.com/portfolio/houses/pictures will become real.corporate.com/portfolio/houses/pictures. I have tried using proxy_pass but that changes the URL. I am currently testing it with one site and following is my server block
server{
listen 80;
location / {
proxy_pass http://www.realestate.com/;
sub_filter_once off;
proxy_redirect off;
proxy_set_header Host $host;
}
}
This setting takes me to realestate.com directly and URL is also changed in the browser. changing location to location /real
gives 404 error.
Please help