wood burning stoves*
The moose likes Java in General and the fly likes URL Redirect to Country domain Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Java in General
Bookmark "URL Redirect to Country domain" Watch "URL Redirect to Country domain" New topic
Author

URL Redirect to Country domain

Ragupathirajan Venkatesan
Ranch Hand

Joined: Aug 18, 2010
Posts: 62
Hi Friends,

When we enter the URL of any enterprise application which is getting used all over the world, it will be redirected to country domain like (www.google.co.in). How this is happening? From where they are getting the information about the country of the end users? is it from the browser request to the server or from any Web server to which the request is getting pointed.

Please post your ideas and drop a note regarding which is better to get such info in order to redirect the url.


Thanks!!!
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 10923
    
  12

They know the IP for your machine (they need this so they can send you whatever you are requesting). From that, it is not too hard to figure out a general idea of where you are.


There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
Ragupathirajan Venkatesan
Ranch Hand

Joined: Aug 18, 2010
Posts: 62
Hi

Thanks for your response. I agree that we can get the ip address of the client and from there we can get all the required details, but please consider me as fresher and post your ideas like how they are gettign the IP address from the request and how they are obtaining the locale information. Just by giving any sample or example.

I am trying to understand the back end logic rather having the assumptions.

Thanks in advance
Aniruddh Joshi
Ranch Hand

Joined: Jul 29, 2008
Posts: 275

All java based web servers use HTTPServletRequest to get information about the requestor and the request.
to elaborate.. a server's job is to respond to requests sent by clients.


Anrd
"One of the best things you could do is to simplify a larger application into a smaller one by reducing its process and complexity - Fowler"
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: URL Redirect to Country domain
 
Similar Threads
Servelet Request Redirect
Bear's Frontman, The requested resource () is not available.
one domain , two different app on two different hosting
Original request referer in Action/Interceptor
Re directing