SRO Hosting - Premium web hosting services  Frequently asked questions

  How can I password protect directories?
When your account was activated, we created a password file (.htpasswd) which allows you to restrict access to certain directories. To protect other directories:

1) Create a file named ".htaccess". This file will specify the name of the password file to use and which user names can access the directory as shown below.

2) Upload it in text mode to the directory you wish to protect.

Ex: Fred wants to block everyone but himself from viewing /public_html/private/:

AuthUserFile /home/fred/.htpasswd
AuthGroupFile /dev/null
AuthName "Protected Area"
AuthType Basic
<Limit GET>
require user fred
</Limit>

For more information (than you likely want), please see the Mosaic Authentication Tutorial.

Back
  Copyright © 2011 SRO Hosting