title: Set-Cookie then Redirect with htaccess
body: <p>I'm moving a site over from one domain to another. I'd like to detect the referer and to offer an explanation on the new site (e.g. Company X has changed its name to company Y), which I'm doing on searches, but after a 301 redirect the <code>HTTP_REFERER</code> is blank so I thought of setting a cookie with a short lifespan then redirecting. On the new site check if the cookie exists and show the message.</p>
  
  <p>This is what I've come up with:</p>
  
  <pre><code>Header set Set-Cookie "oldsiteredirect=true"
  Redirect 301 / http://newsite.com/
  </code></pre>
  
  <p>The redirect is working fine but no cookie is set. And I'd also like to set the expires as now + 10 seconds.</p>
  
  <p>Is this the way to go or is there a simpler solution out there?</p>
  
  <p>Thanks.</p>