/ Published in: Apache

Put this in an .htaccess file to protect the directory it is in and anything below it. This requires that a file named .passwdfile exists in the directory \\\"/full/path/to/\\\" and contains at least one username/password combination.\\r\\n\\r\\nUse this snippet to generate the .passwdfile\\r\\n\\r\\n[Use this snippet to generate the .passwdfile](http://snipplr.com/view/38523/htpasswd-basic-authentication--create-userpass-with-encrypted-password/ \\\"htpasswd\\\")
Expand |
Embed | Plain Text
Copy this code and paste it in your HTML
AuthUserFile /full/path/to/.passwdfile AuthGroupFile /dev/null AuthName "Realm Name" AuthType Basic require valid-user
Comments
