Redirect Based On User Location

Hi Guys,

I have .com and .ca domain and I am attempting to achieve the followings

  1. Canadian Users should use .ca ,and the rest of the world should use .com

  2. I would like to decode IP to location, and remember that IP/location combination so that I dont have to decode IP to location and do the redirect everytime users load a page.

any suggestions please