title: Apache - Location vs Directory Directives
body: <p>Im not that familiar with Apache.</p>
  
  <ul>
  <li>When using <code>&lt;Location&gt;</code>, I am able to redirect users to a sign-on page, forcing them to authenticate and have proper privileges before accessing the <strong>URL</strong>.</li>
  <li>When using <code>&lt;Directory&gt;</code>, it is supposed to allow me to control access to specified <strong>folders and directories</strong>, right?</li>
  </ul>
  
  <p><strong>Question:</strong><Br>
  How does <code>&lt;Directory&gt;</code> behave similarly and differently from <code>&lt;Location&gt;</code>?<br></p>
  
  <ul>
  <li>With <code>&lt;Location /web&gt;</code>: www.mysite.com/web and www.mysite.com/web/foo will be controlled.<br></li>
  <li>With <code>&lt;Directory /webforms&gt;</code>: how will www.mysite.com/web look like if some of the scripts are from that folder?</li>
  <li>With <code>&lt;Directory /pictures&gt;</code>: how will www.mysite.com/web look like if some of the picture are from that folder?</li>
  <li>What about a situation where you have both types of directives active and affecting a single page? What kinds of things should I expect or watch out for?</li>
  </ul>