title: php redirect if domain name
body: <p>If read some post and write this code... but it isn´t working. I have 2 domains in the same hosting account. And I like to redirect visitors to a flash or WordPress site depending on which domain they use.
  This is my code:</p>
  <pre><code>&lt;?php 
  $host = $_SERVER['SERVER_NAME']; 
  if($host == 'elfarosociedades.com.ar' or $host == 'http://www.elfarosociedades.com.ar/' or $host == 'http://elfarosociedades.com.ar/' or $host == 'www.elfarosociedades.com.ar') {
  header('Location: http://www.elfarosociedades.com.ar/index.php');
  else 
  header('Location: http://villarincondelsol.com.ar/home.html'); 
  }
  ?&gt;
  </code></pre>