title: How to redirect to multiple URLs (php/javascript)
body: <p>I have managed to redirect users based on their country code/IP using if/else statement.</p>
  
  <pre><code>&lt;?php   
  if ($geoplugin['geoplugin_countryCode'] == 'US') {    
      print '&lt;script language="Javascript"&gt;window.location="http://domain.com/us";&lt;/script&gt;';   
  }       
  else     
      print '&lt;script language="Javascript"&gt;window.location="http://domain.com/ca";&lt;/script&gt;';
  }
  ?&gt;
  </code></pre>
  
  <p>This works.  However, I have half dozen pages where visitors need to be redirected to based on their location.</p>
  
  <p>How can I send users to various pages based on their locations?</p>
  
  <p>I am very new to web development so please forgive me for asking a newb question.</p>