Forum Moderators: phranque

Message Too Old, No Replies

help with .htaccess

probably a simply problem, help please!

         

clayanime

4:08 pm on Jan 9, 2006 (gmt 0)

10+ Year Member



hello,

ok, i'm working with .htaccess to restrict users from getting to the administrator portion of my website. i chmod-ed the .htaccess page to be 664 permissions. right now, the code for the .htaccess page and the code for the .htpasswd page are both in the directory called "Admin", which is one level down from the main directory.

here's the .htaccess code:
AuthName "Kate's Admin section"
AuthType BASIC
AuthUserFile .htpasswd
require kate

here's the .htpasswd code:
kate:encryptedpassword

it prompts me for the login information, but when i enter the correct information, it refuses me and prompts me to try again. so what am i doing wrong? any help anyone can give me would be greatly, greatly appreciated.

thanks!
-kate

jdMorgan

5:02 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



Kate,

Welcome to WebmasterWorld!

It's usually


AuthType B[b]asic[/b]
Require [b]user[/b] kate

(I only showed needed corrections -- the rest looks OK.)

Jim

clayanime

5:23 pm on Jan 9, 2006 (gmt 0)

10+ Year Member



hello jim,

thanks for the welcome!

i made those corrections but it still won't process it. i'm leaving the changes made though, as it looks like they need to be there.

i used an online encryption tool to encrypt the password. is it possible that the password was wrongly encrypted or something? is there any way to check this?

thanks!

-kate

coopster

5:27 pm on Jan 9, 2006 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



Did you use the htpasswd utility supplied by Apache? This page in the Apache manual is a must read for anybody using this type of authentication:

[httpd.apache.org...]

kcrocker

5:43 am on Jan 19, 2006 (gmt 0)

10+ Year Member



You will also need to specify the complete path name to your .htpasswd file. You can create a PHP file that calls the phpinfo() function to get the path, or talk to your sysadmin/customer service rep. TaTa