Using .htaccess and .htpasswd files are meant to password protect and secure individual pages and directories on your website at the Apache level.
Its a secure means of protection if you have a handful of user/password combination that don’t need to change frequently. If you need the list to change often then you have two options.
- Running back to this generator and manually updating the files.
- Create a script that generates it for you (like this dynamicdrive does) and modifies the files automatically using the fwrite command in PHP.
In short, you need to encrypt your passwords (which gives it some of its security). This tool will help you with that and format everything accordingly.
AuthName "Restricted Area" AuthType Basic AuthUserFile /home/mysite/.htpasswd AuthGroupFile /dev/null require valid-user
Rob:NSQuRKGNxIEbw Staff:1zZ1NoHkATSzk Admins:7UyfWuoBNojBY
Entrupeners, Subscribe for the lastest tools, tips, and tutorials.