title: PHP redirect to different URL depending on what URL is entered in browsers
body: <p>I have 2 domains in the same hosting account that share the same IP address. I want to redirect to different URLS depending on which domain a user types in their browser. I want to use PHP.</p>
  
  <p>EXAMPLE:</p>
  
  <pre><code>&lt;?php
  If browser URL is www.example.com or example.com
  REDIRECT to www.example.com
  
  ELSE if;
  
  browser URL is www.example.org or example.org
  REDIRECT to www.example.org
  ?&gt;
  </code></pre>
  
  <p>Thanks I am a novice so please detail and it should work on all browsers.</p>