Password protect directory

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
User avatar
akjackson1
Forum Newbie
Posts: 18
Joined: Mon Apr 14, 2008 9:08 am

Password protect directory

Post by akjackson1 »

Hi,
I am trying to protect a directory with .htaccess, but it wont accept my user and pass..

This is what I have in my .htaccess file:

Code: Select all

AuthName "Restricted Area" 
AuthType Basic 
AuthUserFile pass/.htpasswd 
AuthGroupFile /dev/null 
require valid-user
and I have a dir called "pass", and my .htpasswd file within that dir, but it just wont let me in when I enter my user and pass, any ideas?
WebbieDave
Forum Contributor
Posts: 213
Joined: Sun Jul 15, 2007 7:07 am

Re: Password protect directory

Post by WebbieDave »

Well, this is not really a PHP coding issue. And, well, not to seem snippy but we should really try to make sure this forum focuses on that. Yes?

But, since you seem like a nice guy, I'll point you to an apache forum :)

http://www.webmasterworld.com/apache/
User avatar
akjackson1
Forum Newbie
Posts: 18
Joined: Mon Apr 14, 2008 9:08 am

Re: Password protect directory

Post by akjackson1 »

Oh, sorry, I forgot! thanks for the link!! :D
Post Reply