title: include after PHP 404 header returning "Oops! This link appears to be broken."
body: <p>To make a long story short, I have dynamic pages on a website that display reviews. If there are no reviews associated with a particular city/county/area/etc the mysql query returns 0 rows which triggers the following code:</p>
  
  <pre><code>if (!$validRevQuery) {
      header("HTTP/1.0 404 Not Found");
      include("http://{$PDS['site']}/404.php?request=".urlencode($_SERVER['REQUEST_URI']));
      exit;
  }
  </code></pre>
  
  <p>On some webhosts this triggers a "URL file-access is disabled" error. Which is fine, but on the ones that allow URL file-access, the 404 file is included and properly displayed. I changed the code slightly to display an absolute path like so:</p>
  
  <pre><code>if (!$validRevQuery) {
      header("HTTP/1.0 404 Not Found");
      $_GET['request'] = urlencode($_SERVER['REQUEST_URI']);
      include($_SERVER['DOCUMENT_ROOT']."/404.php");
      exit;
  }
  </code></pre>
  
  <p>And now, it's giving me the generic "Oops! This link appears to be broken." error page. (I have google toolbar, so this may be different depending upon browser and plugins). No idea why this is happening, so any help is appreciated!</p>