Desktop and Server Virtualisation Specialist 

Twitter LinkedIn E-mail
Precedence Technologies Ltd
Technology House, 36a Union Lane
Cambridge, CB4 1QB, United Kingdom
T: +44 (0)8456 446 800 / +44 (0)1223 359900

Setting up password protected areas on your website

There are two stages to setting up password protected areas on your website:

1) Defining the usernames and password

You may define as many username and password pairs as you want for your website. To generate these, please use the form to the right. Enter your FTP username and password into the top two boxes. Enter a username and password you want to be able to use to access your site and hit Generate.
Your FTP account details
Site passwords

2) Making certain directories check for a username and password

To make a directory and all directories within accessable by any user with a valid username and password, you must create a text file called .htaccess in that directory (N.B. the full-stop at the start of the .htaccess filename is important). This should contain something like:
AuthUserFile /usr/export/home/<accountname>/log/.htpasswd
AuthGroupFile /dev/null
AuthName "<site section name>"
AuthType Basic
require valid-user
Replace <site section name> with the text you want to be presented to the user when they try to access your site (e.g. Private Area). Replace <accountname> by your FTP account username. If you only want certain users to be able to access this part of your site, replace the last line with something like:
require user bob fred jim
(where bob, fred and jim are the usernames you want to access it).
© Copyright Precedence Technologies 1999-2024
Time elapsed:0.019