title: .htaccess, <Directory />, gives Internal Server Error, 500
body: <p>Where and how to use <code>&lt;Directory /&gt;</code> in order to prevent files and folder access in the <code>/</code> . <code>&lt;Directory /&gt;</code> gives for me 500 Internal Server error.</p>
  
  <p>.htaccess</p>
  
  <pre><code>#if i add the next 6 lines (10 lines), i am getting the error "Internal Server Error"
  
      &lt;Directory /&gt;
          Order deny,allow
          Deny from all
          Options None
          AllowOverride All
      &lt;/Directory&gt;
  
      &lt;Directory /web&gt;
        Order Allow,Deny
        Allow from all
      &lt;/Directory&gt;
  
      RewriteEngine On
      RewriteBase /
      Options -MultiViews
      DirectoryIndex /web/index.php
  
      RewriteCond %{HTTP_HOST} ^somedomain\.com$ [OR]
      RewriteCond %{HTTP_HOST} ^www\.somedomain\.com$
      RewriteRule ^/?$ "https\:\/\/somedomain\.com" [R=301,L]
  
      RewriteCond %{ENV:REDIRECT_STATUS} ^$
      RewriteCond %{ENV:REQUEST_FILENAME} !-d
      RewriteCond %{ENV:REQUEST_FILENAME} !-f
      RewriteCond %{ENV:REQUEST_FILENAME} !-l
      RewriteRule ^(.*)$ /web/index\.php?url=$1 [QSA,L]
  </code></pre>