title: Internal server error when no file specified or file is missing
body: <p>I am using this rewrite rule:</p>
  
  <pre><code>RewriteCond %{REQUEST_FILENAME} !-f
  RewriteCond %{HTTP_HOST} ^img.domain.com [NC]
  RewriteRule ^(.*)$ data/photos/$1 [L]
  </code></pre>
  
  <p>Its doing that, when I use f.e <code>http://img.domain.com/profile_image.jpg</code> it will show content of file <code>http://www.domain.com/data/photos/profile_image.jpg</code> without changing url (masked). This is ok.</p>
  
  <p>The problem is, just in case, when somebody enter <code>http://img.domain.com</code>, it will return 500 Internal server error, but I want it to show 403 Forbidden, the same as when you enter <code>http://www.domain.com/data/photos/</code>. I am helpless, how to modify this rewrite rule to achieve this?</p>
  
  <p><strong>EDITED:</strong></p>
  
  <p>Also the same issue is when the file doesnt exist in <code>/data/photos/</code>, then I want to return 404... but its returning 500.</p>
  
  <p>In errorlog is too many recursions...</p>