title: htaccess file properly detects missing file from root directory but does not detect missing subdirectory
body: <p>I have an .htaccess file that I'm using to catch when a requested image doesn't exist so I can make one. The file properly detects a missing image when requested from the directory the .htaccess file is in. But, if I request an image from a subdirectory that technically does not exist, .htaccess does not send me to my image handler. Can someone help me match any subdirectory that does not exist?</p>
  
  <p>Here is my htaccess:</p>
  
  <pre><code>RewriteEngine On
  RewriteCond %{REQUEST_FILENAME} !-d
  RewriteCond %{REQUEST_FILENAME} !-f 
  RewriteCond %{REQUEST_FILENAME} .(jpg|jpeg|gif)$
  RewriteRule ^(.*)$ missingimage.php?img=$1 [QSA,L]
  </code></pre>
  
  <p>That .htaccess file is placed in a folder called "uploads". So for example, my uploads folder also has oranges.jpg. </p>
  
  <p>The following url will correctly pass the request to missingimage.php:</p>
  
  <blockquote>
    <p><a href="http://localhost/uploads/oranges_asdf.jpg" rel="nofollow">http://localhost/uploads/oranges_asdf.jpg</a></p>
  </blockquote>
  
  <p>The following url will <strong>NOT</strong> correctly pass the request to missingimage.php, but instead returns a standard 404 from apache:</p>
  
  <blockquote>
    <p><a href="http://localhost/uploads/not_a_real_directory/oranges.jpg" rel="nofollow">http://localhost/uploads/not_a_real_directory/oranges.jpg</a></p>
  </blockquote>
  
  <p>How can I modify my htaccess to catch requests to directories that don't exist and still pass them to my image handler? Thank you. </p>