问题
I have a website that operates in the UK, I wish to expand to the US using the same URL but with two different servers (one UK server and one US server, as the websites on each server will be completely different). The website is a wordpress marketplace hosted by a linux EC2.
How can I send users from the US to the US version of the site? can I also allow users to alternate between to the two versions? (incase someone from the US wishes to see the UK version?)
回答1:
you can do this with Route53 and geo routing: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/routing-policy.html
More details: You would setup your website / service in the 2 different locations, using 2 different stacks. You need a domain that you've registered and you need Route53 to manage that domain.
You need to create a record set that points your domain based on location. Read through: http://docs.aws.amazon.com/Route53/latest/DeveloperGuide/resource-record-sets-values-geo.html#rrsets-values-geo-location
You need to select the geolocation routing and point the 2 regions to each stack. You also need to set a fallback in case you don't fall in any of the regions.
Also see: https://aws.amazon.com/blogs/aws/route-53-domain-reg-geo-route-price-drop/
来源:https://stackoverflow.com/questions/32955491/using-the-same-url-split-traffic-based-on-country