You are Here:
FAQ
Scripting & Programming
.htaccess
Article #3
How can I manually password protect my files/folders (Linux)? Linux Packages with SSH Access Only!
This includes:
While it is possible to restrict access to the contents of a folder by using the Protected Directories section of the 1&1 Control Panel, this can also be done manually. The advantages to configuring restrictions manually is: You can restrict not only contents of a folder, but individual files as well. You can restrict access to multiple files using a separate username/password for each. The configuration already present in a .htaccess file will not be completely overwritten by changes via the Protected Directories section of the 1&1 Control Panel.
Creating additional usernames and passwords Make sure you are in the same directory as the .htpasswd file (1and1help/protectedDir/ as in the example above) and type htpasswd .htpasswd becky (but replace "becky" with a username of your choice). Enter the password twice and press ENTER, the repeat the password and press ENTER. Restricting access to specific files View the example below for more help on specifying individual files that should be password protected as well as specifying which users that are allowed to access a file.
|
© 2012 1&1 Internet Ltd - About 1&1 Internet