instructions to users

support/ change password | F.A.Q. | glossary
about us
technical specs
payment methods
contact us
hosting packages
server hosting
sign up
special offers
domain availability
jump to another section

password protected directory

To give password protection to a directory, you first need to create a file called ".htaccess" in the directory to be protected. The contents of this file should be something like:

AuthUserFile /home/me/.htpasswd
AuthGroupFile /dev/null
AuthName "photo gallery"
AuthType Basic

<Limit GET>
require valid-user

Change the AuthUserFile to where you want to keep the password list (typically in your home directory), and change AuthName to what you want as the title of the pop-up window asking for the username/password. Be sure to use ASCII mode when transferring this file in ftp.

Next, generate encrypted passwords for all users of this private directory. This can be done here. Cut and paste its output into your .htpasswd file to add accounts. For example, the username test with password test would look like: test:teH0wLIpW0gyQ
Users should be added one per line. Remember to use ASCII mode for this file too.

Copyright © 2023homeWhat Next Limited. All rights reserved. Quality Hong Kong web hosting. | Feedback | Terms & Conditions