.htaccess directory authentication


/ Published in: Apache
Save to your folder(s)



Copy this code and paste it in your HTML
  1. # Directory Authentication
  2. AuthType Basic
  3. AuthName "Directory Authentication"
  4. AuthUserFile /path/to/.htpasswd # find path with <?php echo dirname(__FILE__); ?>
  5. Require valid-user

Report this snippet


Comments

RSS Icon Subscribe to comments

You need to login to post a comment.