Linux - GeneralThis Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
When i visits to msn.com, it redirects me to countryName.msn.com. when i am in UK, my browsers hits to http://uk.msn.com/ and when i am in US it redirects url to www.msn.com (USA).
I want to know, how this happens, either its related to DNS or URL redirector?
I would hazard a guess and say IP based redirection at the web server, not dns.
given that your isp has a unique block of IP's and that block has a known geographical location.
your ip is sent to the web server when you request its junk.
nslookup and ping of msn.com give me msn.com, not msn.com.au
that said, I am in australia, I dont get that redirection anyway.
if its by Webserver, then how can i implement this ??
i have read in Microsoft network infrastructure book,DNS response to the qurey based on requesters IP Address.
in order to implement something like that yourself..
you can make use of a geolocation service.. which cost money (google geolocation)
write a little php script which gets the IP from the request and matches it to the right location, then sends an html redirect header.
or probably a bit of a kludge but, when I tracert my IP address, it's last hop (me) is xxx-xxx-xxx-xxx.dyn.isp.com.au
again, with a script, you could tracert the users IP, and then with regex or some other sort of text matching doodad, extract the country code of the last hop (in my case .au)
and then redirect to the appropriate location.
that said, today is the first I have looked at geolocation, there is likely a much better way to do this.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.