Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

.htaccess and .htpasswd question

Status
Not open for further replies.

compxinu

MIS
Sep 20, 2004
40
US
I am using a .htaccess.php and .htpasswd to protect some functions in my calendar on my site.

But, when I press on a link that is in the calendar which I am trying to protect, I do get the pop up message asking for username and password, but I can put anything in and it will allow access.

I am not sure why I can put anyting in as a user id and and anything for a password and it will allow entry. The only difference I see is that my .htaccess file has the .php extension and my .htpasswd file doesn't.

Here is a copy of the .htaccess.php file

--------


AuthType Basic
AuthName "Password Required"
AuthUserFile /home/virtual/site1/fst/var/AuthUserFile /home/virtual/site1/fst/var/AccessFileName .viewEvent.php
AccessFileName .viewAll.php
<Directory />
AllowOverride None
</Directory>
Require valid-user

--------------------

To create my password file I use the follwoing command..

I cd to the directory I that my calendar is in and run the following.


htpasswd -c htpasswd user for the first user.

and for subsequent users, I use the same command but without the -c option..

Please help!!
 
htpasswd -c htpasswd user" there's not dot. Is that a typo? In the .htaccess you're referencing .htpasswd
 
Sorry -- Yes, it is a typo, the command is:

htpasswd -c .htpasswd 'user'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top