title: Deny direct access of file except server/localhost
body: <p>How can you deny direct access to files in a directory where I do not want users to access it directly but allow the server/localhost to access  because the directory I am trying to avoid direct access contains HTML files that gets output/parsed by PHP.</p>
  
  <p>The listing of the directory looks like this:</p>
  
  <pre><code>template
     |
     |
     +--------&gt; acp
     |           |
     |           +------&gt; acp_index.html
     |           +------&gt; acp_settings.html
     |
     +--------&gt; css
     |           |
     |           +------&gt; stylesheet.css
     |
     +--------&gt; js
     |           |
     |           +------&gt; scripts.js
     |
     +---&gt; index.html
     +---&gt; login.html
     +---&gt; etc...
  </code></pre>
  
  <p>In the <code>template/acp</code> I need to avoid direct access to files, but localhost/the server should be able to access and parse it.</p>