Mobile app version of vmapp.org
Login or Join
Nimeshi995

: Use same domain for two websites, depending on customer IP Here's the scenario I want to know if possible and how: Scenario Domain (www.foo.com) at one hosting provider. Two websites, one at

@Nimeshi995

Posted in: #Dns #Domains #Masking #UrlRewriting #WebHosting

Here's the scenario I want to know if possible and how:

Scenario


Domain (www.foo.com) at one hosting provider.
Two websites, one at bar.com and another one at biz.com, each at a different hosting provider.


Actions


When a user enters foo.com, depending on the IP location, it will
load bar.com or biz.com. It is important that the user sees foo.com (masking, not redirecting).
So a user from UK would navigate foo.com website (which is really bar.com) and a user from France would navigate foo.com website (which is really biz.com).

So far I have managed to find a "fix" which would consist of loading a small website with an iframe at the foo.com hosting, and loading the corresponding website in it. I'm wondering if there's a more elegant solution than this.

10.01% popularity Vote Up Vote Down


Login to follow query

More posts by @Nimeshi995

1 Comments

Sorted by latest first Latest Oldest Best

 

@XinRu657

Iframe will not work because you want to keep links e.g. from bar.com to bar.com/contact look like to foo.com/contact.

So, as @deceze said, you need to set up reverse proxy but also you need to configure something which will make search and replace inside the servers response. Perhaps there are many such tools, but just to name one: privoxy.

10% popularity Vote Up Vote Down


Back to top | Use Dark Theme