[Home]   i n s t r u c t i o n s
< back to index       Password Protected Directory
 
i n f o
   about us
   technical
   payment
   contact

s e r v i c e s
   packages
   server
   design
   sign up

s u p p o r t
   instructions
   F.A.Q.
   password

m i s c
   resellers
   offers
   free

h o m e

 

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 forthe 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.

 

 
TOPICS
getting started
domain registration | mail forwarding | checking mail | uploading your site
basic features
web stats | hit counters | form-to-mail cgi | redirect cgi | autoresponders |
basic mailing lists | advanced mailing lists | search engine submission | frontpage extensions | password protected directory | custom error pages | subdomains
advanced features
cgi scripts | server-side includes | php | mysql |

 
All your hosting dreams come true!
P R O F E S S I O N A L
hkhosting.com
W E B   S E R V I C E S

Copyright © 1999-2003 HK Hosting Ltd. All rights reserved. Terms & Conditions