How to write code for a webpage to redirect based on user location?

1 replies
Hi,
I have huge website .We advertise our contents on third party website or search engine.We want to modify in our code.Condition is- When user clicks to our website on advertisement,this will hit to my central website home page but meanwhile before reaching to home page ,this should redirect to webpage of a website having deatils about that location.I mean I have many pages for each webpages based on location.If user is accessing internet from Neywork,webpage should redirect to Neywork related web page.

Please help with your advice and solution.How to write code for this?Application is in Struts framework(Java &J2EE).
#based #code #location #redirect #user #webpage #write
  • Profile picture of the author TallyDon
    You can use a GeoIP database from maxmind. Install is pretty simple, all the complexity is in the classes, so you can just call the function with the ip as a parameter. However these databases are not 100% accurate, but more like 98,7%
    {{ DiscussionBoard.errors[2884938].message }}

Trending Topics