title: htaccess deny acces to directory if logged out (checked with php)
body: <p>I would like to deny access to visitors to a specific directory if they are not logged in.
  And redirect them to a "you are not logged in" .html file.</p>
  
  <p>How can I do this? Is there some way to edit .htaccess with php if logged out?</p>