PDA

View Full Version : Password protect works; user/pass combos don't?


Benedira
12-11-02, 08:39 AM
According to the tutorials offered, I set up a second .htaccess file and a .htpasswd file.

I put the new .htaccess file in the folder I wanted protected, which is intended to be accessed as a subdomain.

I put the .htpasswd file in my root directory, as instructed by the tutorial.

The .htaccess file is looking for the .htpasswd file in the root directory, is looking for it by the correct name, and has the three users specified by name between the 'Limit' tags.

The .htpasswd file contains only the three users mentioned above, with the username/password pairs encrypted through the script linked in the tutorial.

Both files were uploaded in ASCII, without a doubt.

The password protection works, but it isn't recognizing the username/password pairs in the .htpasswd file. I have tried all three names/pass pairs. The pairs fail whether I try to access the protected area via the subdomain or the regular folder path. The pairs fail whether I ask the browser to remember the login or not.

Things that may or may not matter:
- the first letter of the usernames are capitalized (everywhere)
- I'm on a Mac (OSX 10.2.2, with IE 5.2.2)

Any idea why this might not be working correctly?

(If an admin checks this out, the directory I'm trying to protect is sisadmin - htdocs/sisadmin)

Kim Olav Svines
12-11-02, 12:13 PM
http://forum.powweb.com/showthread.php?s=&threadid=12553

Check out this guy's site, it may help you.

Ddr
12-11-02, 02:23 PM
Hi Benedira

Your post was not clear on one thing....you said you have two different .htaccess files and two different .htpasswd files? Do you have both .htpasswd files in the root directory and do they both have the same name? If you do, then that is the cause of your problem.

Just FYI, you can name .htpasswd anything. You can call it .joe or .benedirapasswords or anything you want as long as it has the leading (.) and you place the correct path to that file in your .htaccess.

Other than that, you might want to post the contents of your .htaccess file for us to check for you. The usual checklist of errors is Uploading in ASCII, using a pure text editor without word wrap, putting the correct path into the .htaccess file, and when all else fails, simple recreating both from scratch to make sure there are no unseen typos or extra hidden characters.

Come back if you need more help

Dale

kanwulf
12-12-02, 02:14 PM
Just a note:

You can name .htpasswd anything, it doesn't have to be a hidden file.

IE. The dot in front of the name isn't required.

Ddr
12-12-02, 02:50 PM
I am not sure what happened to Benedira....but thanks for all your input on .htaccess.

Learn something new every day if you just listen :)


Dale