View Full Version : Help .htpasswd
I have followed the thread posted by Jade and I am unable to get pass the pop-up asking for the password. Please tell me what I am doing wrong.
My objective is to password protect my admin file.
Help Help
BerksWebGuy
3-25-04, 09:29 AM
Ok...make sure you follow this tutorial HERE (http://help.powweb.com/tutorials/htaccess/passprotect.php).
Put that file in the folder with the admin file. Make sure you make it in a simple-text editor like notepad (not wordpad). And you upload in ASCII (not binary).
I'm sure you'll have a few more questions...but lets get it step by step.
Thank you for responding to my mail. I am still having a problem with the .htacess and/or the .htpasswd file. This is my file:
AuthUserFile /www/u/username/etc/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Area"
AuthType Basic
<Limit GET>
require username's name
</Limit>
etc file:
username:myname
When I add admin in the broswer and hit enter, I get a login box which asks for the user and password. I type in user and hit enter and it brings me back to the login page.
for "username's name" I use the name in my ftp login. I still cannot get beyond the login box.
Please help, this has taken two weeks to get this far along.
Thanx.
BerksWebGuy
3-25-04, 09:02 PM
OK...make sure you change the first line in this file to match where you put your .htpasswd file:
AuthUserFile /www/m/momas/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Area"
AuthType Basic
<Limit GET>
require (user in .htpasswd file)
</Limit>
Then make your .htpasswd file, with a username you make up and its encrypted password. I may look like this:
momas:d8g93klsd23
Put this file in your root folder (on the same level as htdocs and cgi-bin).
I am still not able to get beyond the popup screen for the user and password. It keeps looping on me. Username--password, username --password. I have followed all of the instructions you provided. I must be overlooking something. Please hellp!!!
Isn't the syntax:
require user username
where you replace username with the name from the .htpasswd? The examples I've seen here are missing the keyword "user". An alternative is:
require valid-user
BerksWebGuy
3-26-04, 10:29 AM
Yep, you're right...I missed that one <berkswebguy slaps himeself in the head>.
So it should be:
AuthUserFile /www/m/momas/.htpasswd
AuthGroupFile /dev/null
AuthName "Members Area"
AuthType Basic
require user momas (or .htpasswd user)
You don't need the <limit> statements.
Thanks for the assistance all. I finally got through the quagmire and am now able to block out view of my admin file.
Now I need information about the .htaccess file itself. There was a .htaccess file already in 'Admin'. I renamed it and uploaded the other .htaccess file. I assume I need the information in the renamed file.
Can I merge the two files and if so how do I do it. (Cut and paste???) I tried renaming the uploaded file to .htaccess and when I did I lost the one that was already there.
Thanx.
vBulletin v3.6.0, Copyright ©2000-2009, Jelsoft Enterprises Ltd.