hkhosting.com

instructions to users

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

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
</Limit>

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 © 1999-2016homeHK Hosting Ltd. All rights reserved. Quality Hong Kong web hosting. This page is valid HTML 4.01 Transitional | oldlook | Feedback | Terms & Conditions