title: Geolocation redirect to same page on different domain?
body: <p>I'm trying to figure out how use geolocation to reidirect people from a .CA domain to a .US domain and keep them on the same page they were viewing. 
  For example if I post something to social media such as this: <a href="http://www.band-brand.ca/products/the-agonist-machine" rel="nofollow">http://www.band-brand.ca/products/the-agonist-machine</a>
  US residents who click on that get redirected to the main .US domain. 
  How can I allow them to click on that link and just have it change over to the .US domain (<a href="http://www.band-brand.US/products/the-agonist-machine" rel="nofollow">http://www.band-brand.US/products/the-agonist-machine</a>)
  Here's the basic code I have:</p>
  
  <pre><code>     &lt;script&gt;
  jQuery.ajax( { 
    url: '//freegeoip.net/json/', 
    type: 'POST', 
    dataType: 'jsonp',
    success: function(location) {
      // If the visitor is browsing from United States.
      if (location.country_code === 'US') {
        // Redirect him to the american store.
        window.location.href = 'www.band-brand.us';
      }
    }
  } );
  &lt;/script&gt;
  </code></pre>
  
  <p>Thanks in advance for any help/advice,
  Jon</p>