title: Query about htaccess
body: <p>I'm trying to protect files within a given directory from direct access</p>
  
  <p>I have tried numerous combinations of contents in different .htaccess files</p>
  
  <pre><code>order deny,allow
  deny from all
  </code></pre>
  
  <p>I have developed a website which has a structure that can be summarised as:</p>
  
  <pre><code> htdocs
       .htaccess
       ...
       wp-content
        ...
        uploads
         ...
         Private
          .htaccess
          ...
  </code></pre>
  
  <p>I need to access files in the Private directory from a Members Only within the website, but protect them from direct access.  For example, if I enter the following in a web browser I can access a document directly:</p>
  
  <pre><code>http://www.Mywebsite.com/wp-content/uploads/Private/Admin-Accounts.xls
  </code></pre>
  
  <p>I thought this could be solved by including the following in the Private/.htaccess file:</p>
  
  <pre><code>order deny,allow
  deny from all
  </code></pre>
  
  <p>However, it doesn't seem to matter what is in the Private/.htaccess file, I can still directly access files in the Private directory.  The contents of the .htaccess file in the root directory seem to over-rule.
  If I search the site I find .htaccess files in numerous directories.  What defines which one is in use?</p>