title: PHP - Custom error handling. Redirected 404 is being hijacked by AVG Anti-Virus. How to stop?
body: <p>I have a website which uses the custom 404 error handling in PHP/Apache to display specific pages.<br>
  e.g. <a href="http://metachat.org/recent" rel="nofollow noreferrer">http://metachat.org/recent</a> </p>
  
  <p>I've a feeling this is a bad way of doing this, but it's code I inherited...</p>
  
  <p>Although the page displays correctly on most browsers, I'm getting a situation where AVG Anti-Virus is hijacking the page and redirecting it to an offsite 404 page. </p>
  
  <p>I've tried to force a header (Status: 200 OK) using the header command in PHP, but if I do a curl -I of the page, I get the following...</p>
  
  <pre><code>HTTP/1.1 404 Not Found
  Date: Fri, 03 Oct 2008 11:43:01 GMT
  Server: Apache/2.0.54 (Debian GNU/Linux) DAV/2 SVN/1.1.4 PHP/4.3.10-16 mod_ssl/2
  .0.54 OpenSSL/0.9.7e
  X-Powered-By: PHP/4.3.10-16
  Status: 200 OK
  Content-Type: text/html
  </code></pre>
  
  <p>I guess that first line is the line AVG traps for its forced redirect. 
  Without rewriting the software to use Mod_rewrite (which I don't really understand), how can I (in PHP) stop the "HTTP:/1/1 404 Not Found" line being sent in the headers when displaying this page?</p>
  
  <p>Thanks. </p>