title: How to prevent users from browsing documents in a folder without logging in?
body: <p>For example, a user cannot access any PHP files like <code>www.mywebsite.com/mypage.php</code>.<br>
  That user is redirected back to the login page if they are not logged in.</p>
  
  <p>The problem is they <em>are</em> able to access a URL like: <code>www.mywebsite.com/test/mydocument.pdf</code>.</p>
  
  <p>How can I deny access and redirect to the login page, if they are not logged in?</p>