title: How can I keep query from referring page from being passed?
body: <p>I'm setting something up for an SEM company that bids on ads on google and the sends traffic to various partners. Users show up with a URL that includes the KW's they searched for (site.com?k=laser%20tag) &amp; traffic gets analyzed. Outgoing traffic to partners goes through a file (site.com/outgoing.php) which has "header("Location: $destination");" at the bottom with $destination being one of 200 partner's URLs.</p>
  
  <p>This works fine, but the problem is that when the user goes off site to a partner, they can see the referring page and can see what the search terms were. They'd prefer that the partners not see what terms they bid on because it would allow the partner to just circumvent them and roll their own SEM strategy.</p>
  
  <p>Is there a way I can strip out the query from the referring URL in the "outgoing.php" file? Since all out going traffic goes through this file, can't I just put this in it:</p>
  
  <pre><code>$ref=explode('?',$_SERVER['HTTP_REFERER'])
  header("Referer: $ref");
  header("Location: $destination");
  </code></pre>
  
  <p>Or, do I need to somehow keep the query from showing up in the URL in the first place?</p>