NameSilo

.htaccess & .htpasswd to protect a web directory thread

Spaceship Spaceship
Watch

JsteRmX

Established Member
Impact
2
.htaccess & .htpasswd to protect a web directory

well i created these two files and put them in the correct places, but it doesnt seem to work.

i would appreciate some help with this.

.htaccess file located in the directory i want protected:
Code:
AuthUserFile /home/content/u/s/e/username/html/.htpasswd
AuthGroupFile /dev/null
AuthName You must log in to access this page
AuthType Basic
require valid-user

.htpasswd file located at top level directory. I have GoDaddy if that matters.
Code:
username:md5 encrypted password

Obviously, i used the correct path and username & password in my actual files - I just took them out for posting purposes.

Do I need to chmod anything to allow this to work?
I can navigate to the "protected" directory without being prompted for a login. This is not working!

Thanks to whoever can help.
 
0
•••
The views expressed on this page by users and staff are their own, not those of NamePros.
GoDaddyGoDaddy
no one knows anything about this?

bump =)
 
0
•••
ok well i figured out that GoDaddy provided me with the wrong server path!

I added 'www' to the end of my AuthFile path and this worked and prompted me for a password when i tried to access my protected directory.

So if anyone has GoDaddy and trying to do this, you may need to make your path /home/content/u/s/e/username/html/www/.htpasswd to work

But now i can't log in! I have tried everything. I keep getting this error:

Authorization Required
This server could not verify that you are authorized to access the document requested. Either you supplied the wrong credentials (e.g., bad password), or your browser doesn't understand how to supply the credentials required.

Is there something wrong with my browser? I tried both IE and firefox, but both with no avail. I tried talking to godaddy, but they refuse to give any support on this.

I hope someone can help me out here.

thanks.
 
0
•••
How did you setup your .htpasswd?

The password isn't encrypted in md5. Use PHP's crypt() function to figure out the right password for it.
 
0
•••
yeah i actually used an online htpasswd encrypter. you are right, it is not md5, i was mislead at the time of my first post.

well here is my .htpasswd
349349877:09yA5nvP5OiV6


thanks for the help.
 
0
•••
Do you want the username to be 349349877? The username doesn't get encrypted.
 
0
•••
0
•••
yeah i want the username to be 349349877

i tried using that tool posted above, but the files it produced did not solve my problem either. the directory i am trying to protect contains only php pages, is this the problem?
 
0
•••
Appraise.net

We're social

Domain Recover
DomainEasy — Payment Flexibility
  • The sidebar remains visible by scrolling at a speed relative to the page’s height.
Back