
What's covered?This topic describes how to password protect a folder in your webhelp output. That can stop unauthorised users from accessing certain topics. Note that this method will only work on a Unix server. |
Click this link and enter any username and password except those below.
Now try with username pumpkin and password pie (case sensitive).
Once you have got into the demo page, you will be able to go to it again in the same session without being prompted for the username and password.
Close Internet Explorer and then try again. The username and password will be required.
You need to create three files:
.htaccess
.htgroup
.htpasswd
Note the dot in front and that there is no file extension.
This file goes in the folder that is to be protected. It will look something like this:
AuthUserFile /path/.htpasswd AuthGroupFile /path/.htgroup AuthName Restricted AuthType Basic <Limit GET POST PUT> require group secured </Limit> |
The path must be the full path from the root of the server. See .htpasswd and .htgroup for information about where to locate these files.
AuthName can be whatever you want. (Shades of Tina Turner's Private Dancer here!).
After "require group" add the name of your group. Again, that can be whatever you want.
This file is best put in a folder that is above the root of your site so that it is not accessible to anyone else. It will look something like this:
| secured: userone usertwo |
It comprises the group name as specified in .htaccess followed by the usernames for whoever is authorised to access the folder contents.
This goes in the same folder as .htgroup. It will look something like this:
userone:encrypted password usertwo:encrypted password |
The password needs to be encrypted. Click this link to go to a site where you can enter the username and password to find out the encrypted version.
User pumpkin and password pie would be pumpkin:UjQAdKvQeyp3w
I hope this helps. I am no authority on the subject and suggest you search on .htpasswd for a whole host of sites that can provide far deeper knowledge.
I found this information by looking at Webmonkey. However they seem to have reorganised their site and I cannot now find the same topic. There is a similar topic you might like to look at on Freewebmasterhelp.
![]()
Date |
Changes to this page |
28 Nov 05 |
Amended during conversion of site to Dreamweaver. The Webmonkey article previously referred to seems to have been pulled. |