View Full Version : .htacces problem

11-13-2003, 06:28 PM
Hi Everyone
I have successfully set up a htaccess and htpasswd file to protect a members area of my website but . . .it password protects the whole site and not the set of pages i want it to.
This is what i have as the .htaccess file:

AuthType Basic
AuthUserFile .htpasswd
AuthName "Please enter your username and password"
require valid-user

and i have saved it into the folder where all the member pages are going to be.
The other pages for the site are in the root directory, and the members pages are in a seperate folder in the root directory, and the htaccess and htpasswd files are in the members folder.
What am i doing wrong/missed?
It's the first time i've done this so please explain in simple terms, and i have read the htaccess posts in the forum and the link that goes to the htaccess explanation. I get how to do the files, it's just where to put them so that only the pages i want protecting are protected and not the whole site.
I hope that made sense!
Thank you

11-15-2003, 03:40 PM
save in the folder you want to protect (will protect sub-folders as well ) without the <directory> tags or use the full path to the directory !

but just ...

AuthType Basic
AuthName "Please enter your username and password"
AuthUserFile /home/user/full/path/to/.htpasswd
require valid-user

would be fine