Password Protected Directory

# .htaccess file in the directory you want to protect, the first line prevents wordpress 404 page:

ErrorDocument 401 default
AuthUserFile /home/sitename/.htpasswds/.htpasswd
AuthType Basic
AuthName "Restricted Area"
Require valid-user

0 Comments

You must be logged in to post a comment.