title: .htaccess 403 redirect to 404 Issue
body: <p>My directory structure is like this.</p>
  
  <pre><code>--index.html
  --img
     --.htaccess
     --image.png
  </code></pre>
  
  <p><code>index.html</code> simply loads <code>image.png</code>. When someone types <code>mysite.com/img</code>, I want to 1) prevent people from listing img directory and 2) Return <code>404</code> error instead of <code>403</code> when try to access the img folder.</p>
  
  <p>As per <a href="https://stackoverflow.com/a/548210/723962">this</a> SO answer, I've created an <code>.htaccess</code> file in the img folder with this content.</p>
  
  <pre><code>Options -Indexes
  &lt;FilesMatch /img(/?|/.*)&gt;
      Order allow,deny
      Deny from all
  &lt;/FilesMatch&gt;
  
  RedirectMatch 404 ^/img(/?|/.*)$
  </code></pre>
  
  <p>However, when I do this <code>index.html</code> itself can't find image.png anymore and it also gets a 404 error. If I remove the <code>RedirectMatch</code> line from <code>.htaccess</code> then it works but now mysite.com/img returns 403 error. </p>
  
  <p>Is it possible for index.html to load the image and <code>mysite.com/img</code> returns a 404 response via .htaccess file? I'm very new to Apache, so not sure if these sounds naive or the requirements are kind of mutually exclusive/</p>