title: PHP 301 Redirect - collect referrer
body: <p>I'm doing a 301 redirect on site A to site B - when the user arrives at site B it needs to find the page the user came from. This doesn't seem to be working though:</p>
  
  <pre><code>$_SERVER['HTTP_REFERER']
  </code></pre>
  
  <p>whereas if I do a link to the page </p>
  
  <pre><code>&lt;a href="http://site-b.com"&gt;go&lt;/a&gt;
  </code></pre>
  
  <p>I get the referrer through. Is there a reason it doesn't come through after the redirect? If so can anyone offer any advice on how to do this. I want to avoid at all costs having a query string on the redirect.</p>
  
  <p>Is there maybe another header I need to send with the page that redirects?</p>
  
  <p>Thanks for any advice!</p>