title: PHP header location absolute URL
body: <p>I came across an issue where an absolute path set in header location wouldn't work but pointing to the file itself did. This only affected a few customers. One of them was nice enough to try connecting through a VPN which made the header location work. </p>
  
  <p>Didn't work:</p>
  
  <pre><code>header('Location: http://www.example.com' . $_SERVER['PHP_SELF']);
  </code></pre>
  
  <p>Works:</p>
  
  <pre><code>header('Location: ' . $_SERVER['PHP_SELF']);
  </code></pre>
  
  <p>Can anyone shine some light on this?</p>
  
  <p>Thanks</p>