title: htaccess Deny from all and 500 Internal Server Error
body: <p>I want to restrict direct access to a specific directory (and all the files inside) on my local server.
  The directory is: <code>C:/Server/www/project/html/</code></p>
  
  <p>I've tried the following code (.htaccess is placed in www directory - /project/html/ doesn't work too):</p>
  
  <pre><code>&lt;Directory "C:/Server/www/project/html/"&gt;
      AllowOverride all
          Order Deny,Allow
      Deny from all
  &lt;/Directory&gt;
  </code></pre>
  
  <p>However, it causes 500 Internal Server Error and I can't understand why.</p>
  
  <hr>
  
  <p>Apache error log:</p>
  
  <pre><code>[Fri Aug 05 16:06:01 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  [Fri Aug 05 16:06:01 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  [Fri Aug 05 16:06:01 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  [Fri Aug 05 16:06:01 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  [Fri Aug 05 16:06:01 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  [Fri Aug 05 16:06:02 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  [Fri Aug 05 16:54:12 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  [Fri Aug 05 16:54:12 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here
  [Fri Aug 05 17:05:06 2011] [alert] [client 127.0.0.1] C:/Server/www/.htaccess: &lt;Directory not allowed here, referer: http://localhost/project/index.php?id=8
  </code></pre>