cancel
Showing results for 
Search instead for 
Did you mean: 

passwording a folder with .htaccess & .htpsswd

Dabbler
Posts: 11
Registered: ‎01-08-2007

passwording a folder with .htaccess & .htpsswd

I've stup a folder called 'psswd_clubfiles' and want any pages in there to be protected by a basic password system.
I was told about .htaccess and shown a quick guide on how to use it.
I've set up the 2 files in the folder.
.htaccess
AuthName "Restricted Area" 
AuthType Basic
AuthUserFile /psswrd_clubfiles/.htpsswd
AuthGroupFile /dev/null
require valid-user

And
.htpsswd
Chesterfield:g/AWzAKyf0LeM

It now asks me for a password but when i enter the details it won't let me in.
Any ideas?
http://www.theblue.plus.com/psswd_clubfiles/blank%20page.htm
user name admin
password admin1
Also tried
AuthUserFile .htpsswd
and
AuthUserFile /.htpsswd
as .htpsswrd is in the same folder but no luck.
Please help!
Ta
2 REPLIES 2
Community Veteran
Posts: 14,469
Registered: ‎30-07-2007

Re: passwording a folder with .htaccess & .htpsswd

The path to the .htpsswrd (should really be .htpasswd by convention) file is wrong. The path is not relative to your home directory but to the root of the webserver.
See http://usertools.plus.net/tutorials/id/5 which explains how to find the full path.
Dabbler
Posts: 11
Registered: ‎01-08-2007

Re: passwording a folder with .htaccess & .htpsswd

Thanks! all sorted!