Welcome to WebmasterWorld Guest from 34.204.203.142

Forum Moderators: Ocean10000 & phranque

Message Too Old, No Replies

.htaccess & .htpasswd are not working correctly.

     
6:39 am on Jan 7, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 7, 2004
posts:12
votes: 0


Hi everyone!

I just have a small issue with my .htaccess and .htpasswd

I am just testing this so i made a test directory on my webserver and put the .htaccess and .htpasswd files in it.

I have entered that user auth is recuired. In .htpasswd i have entered that the username and pass are test.

But everytime i enter this it just prompts me for another login screen, like username/pass are wrong. But i aint so stupid to type test wrong? ;)

AllowOverride is set to all in my httpd.conf.

Anyone has a clue what is wrong?

I am using a windows 2000 server.

7:01 am on Jan 7, 2004 (gmt 0)

Senior Member

WebmasterWorld Senior Member jdmorgan is a WebmasterWorld Top Contributor of All Time 10+ Year Member

joined:Mar 31, 2002
posts:25430
votes: 0


Leys,

Welcome to WebmasterWorld [webmasterworld.com]!

The contents of the .htpasswd file must be encrypted using a tool installed with your server. I'm not sure how this is supported on Win 2000, but generally, you have to have command-line access, type in the name of the account manager/password-creation utility, and then enter the username and password. The output is merged with the current contents of .htpasswd, enabling that 'account'.

Jim

7:04 am on Jan 7, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 7, 2004
posts:12
votes: 0


Thanks!

I have tried that aswell.

But it is not working :(

dcrombie

10:16 am on Jan 7, 2004 (gmt 0)

Inactive Member
Account Expired

 
 


Make sure that the path to the .htpasswd file as defined in the .htaccess file is correct. If it's not then you will get the behaviour you describe.

To be more secure you should also place the .htpasswd file (if possible) outside of the www-accessible tree. ie. if your website is at /home/yourname/public_html/* then the file should go at /home/yourname/.htpasswd

12:39 pm on Jan 7, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 7, 2004
posts:12
votes: 0


the thing is.

I host a few sites for people and i allow them to use htaccess.

But the tricky part is. If they want to be able to use it they have to put:

D:/Apache/Apache2/htdocs/directory name/place of htpasswd/.htpasswd

Cant this be done differently?

Now they have to input D:/Apache/Apache2/htdocs.

1:20 pm on Jan 7, 2004 (gmt 0)

New User

10+ Year Member

joined:Jan 7, 2004
posts:12
votes: 0


Ok i got this fixed.

thanks all!