trying to get .htaccess working .. partually works, but ...

XML, Perl, Python, and other languages can be discussed here, even if it isn't PHP (We might forgive you).

Moderator: General Moderators

Post Reply
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

trying to get .htaccess working .. partually works, but ...

Post by lazy_yogi »

I have this in the .htaccess file

Code: Select all

AuthType Basic
AuthName "Password Required"
AuthUserFile /import/elfman/1/username/dir/.htpasswd
Require valid-user
I then set a password using

Code: Select all

htpasswd -c /import/elfman/1/username/dir/.htpasswd user
and then when i try to go into there it asks me for ueername and pass as it should.
I type it in and it works !

But once in, when i click on one of the files listed in the dir, it asks again for username and password.
However, I can't get into there to view the file. It says incorrect username or password

any ideas at all .. this is really odd
(I don't have access to the server)
Caroline
Forum Commoner
Posts: 25
Joined: Thu Jan 30, 2003 1:38 pm

Post by Caroline »

Try to encrypt your password first!

http://www.vnkey.com/vn.php?key=tool&se ... ss_encrypt
User avatar
volka
DevNet Evangelist
Posts: 8391
Joined: Tue May 07, 2002 9:48 am
Location: Berlin, ger

Post by volka »

isn't that the purpose of htpasswd ?
oldtimer
Forum Contributor
Posts: 204
Joined: Sun Nov 03, 2002 8:21 pm
Location: Washington State

Post by oldtimer »

htpasswd will indeed encrypt the password.

When I use mine I make a .htpasswd file like

Code: Select all

# Access file
order allow,deny
allow from all
require valid-user
Authname DirectoryName
AuthType Basic
AuthUserFile /var/passes/coastgames/.htpasswd-jj
As I have several domains I set it up to where all .htpasswd files are stored in the passes directory and then under a users name.
User avatar
lazy_yogi
Forum Contributor
Posts: 243
Joined: Fri Jan 24, 2003 3:27 am

Post by lazy_yogi »

Yea .. this does that for you already .. that's y it works to get into the directory in the first time

Code: Select all

htpasswd -c /import/elfman/1/username/dir/.htpasswd user
Post Reply