View Full Version : .htaccess password protection

03-24-2007, 10:15 PM
In my webspace I have a site that I wish to password protect. This is in a directory called chloe.

I have uploaded the .htaccess file into chloe and created a directory called secure, also in the root of my space, ie parallel to chloe as recommended. In other words there are two directories, one called chloe and one called secure. In secure is the .htpasswd file which contains the user name and the encrypted password, created at


But it won't allow access. I suspect the problem is the path from the .htaccess file in chloe to the .htpasswd file up in secure. I have tried many variations, without success.

The .htaccess file reads:

AuthName "Chloe and Emily"
AuthType Basic
AuthUserFile ../secure/.htpasswd
AuthGroupFile /dev/null
require valid-user

The .htpasswd file reads:


I arrive at the password entry box OK so the .htaccess file is working, so I am left with the an error in the path in the .htaccess file.

Any help appreciated

03-27-2007, 06:38 AM
It was the path, now sorted and working.