title: PHP header 404 .htaccess ErrorDocument not working on local machine (MAMP)
body: <p>Currently I get a 404 error, but it does not redirect to 404.php</p>
  
  <p>Here are the contents of my index.php:</p>
  
  <pre><code>&lt;?
  header("HTTP/1.1 404 Not Found");
  exit;
  ?&gt;
  &lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;Index&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Index&lt;/h1&gt;
      &lt;p&gt;This is the homepage, but I'd like it to go to 404.php!&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is 404.php:</p>
  
  <pre><code>&lt;html&gt;
  &lt;head&gt;
      &lt;title&gt;404&lt;/title&gt;
  &lt;/head&gt;
  &lt;body&gt;
      &lt;h1&gt;Page Not Found!&lt;/h1&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
      &lt;p&gt;This is my test custom 404 page!&lt;/p&gt;
  &lt;/body&gt;
  &lt;/html&gt;
  </code></pre>
  
  <p>Here is .htaccess:</p>
  
  <pre><code>ErrorDocument 404 /Users/me/folder/mamp/404.php
  </code></pre>
  
  <p><code>/Users/me/folder/mamp/404.php</code> represents the root document folder in MAMP preferences.</p>
  
  <p>I have also tried the relative path of <code>/404.php</code> and the URL of <code>http://localhost:8888/404.php</code> in .htaccess. So far all the same result, a white page, issuing a 404 but no redirect.</p>
  
  <p>From my reading this all combined should do the trick; still missing something it seems.</p>