There are at least a few ways to do this:
- floating frame
. You can make a page under www.website2.com/mobile , which points to www.website1.com/Mobile , but the address bar will remain the same. W3 Schools contains some basics in which I also used this as a way to create a page as part of the page concept.
Reverse proxy. Nginx can be used to make the site under www.website2.com/mobile go to www.website1.com/Mobile as one software package that could be used. The Nginx documentation will have more specific details, although I have used this sometimes in the past.
From the second link as an example:
location /some/path/ { proxy_pass http://www.example.com/link/; }
In your case, you probably want to do something like this:
location /Mobile { proxy_pass http://www.website1.com/Mobile/; }
Of course, you need to make sure that Nginx is configured correctly, as it replaces your original web server. The idea was that Nginx does redirection and stuff behind the scenes through its proxies, which the user never notices.
source share