title: Restrict direct access to folder php
body: <p>I have this site where I upload images. 
  The content is only viewable to the logged in user. (using very simple session based authentication).
  Now the site is working fine, but the problem is when I directly access the images folder through the url bar all the images become available.
  I want to restrict direct access to folder as well, so it would display some error or will require authentication. 
  How would I do that? 
  Thank you.</p>