.htaccess protect directory

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

also requires an .htpasswd file to be created in a secure directory

Copy this code and paste it in your HTML
  1. AuthUserFile /home/user/domain/secretfolder/.htpasswd
  2. AuthType Basic
  3. AuthName "Login Details"
  4. Require valid-user

Report this snippet


RSS Icon Subscribe to comments

You need to login to post a comment.