title: How can php trigger a 404 error on nginx?
body: <p>This should be a simple question, but I'm having trouble with it: how can I get php to trigger a 404 error, so that the page the user sees has a true 404 header? I've seen several answers to this, but none have worked for me, maybe because I'm on nginx. I've tried:</p>
  
  <pre><code>header("Status: 404 Not Found");
  header("HTTP/1.0 404 Not Found");
  </code></pre>
  
  <p>When I've tried each of these (with an exit() afterwards), the server has sent a 200 header.</p>
  
  <p>It seems like this question has been asked in many permutations (Apache / php / sending 404s from the server level, etc) but I'm having trouble finding someone trying to do what I'm trying to do. So, apologies if this is a duplicate - if it is I won't be surprised, and please let me know.</p>
  
  <p>Thank you :) - Katie</p>