.htaccess-keep prompt username and password
hi, this is the first time i deal with .htaccess.
in my .htaccess file i have this:
AuthUserFile /home/abc/.htpasswd
AuthName "ABC"
AuthType Basic
require valid-user
and i use the password generator to generate a password.
i upload the .htaccess file in home/abc/123 whereas i upload the .htpasswd file in home/abc/.
when i try to browse file in directory 123, it prompt me to enter username and password. but when i enter the correct username and password, it still prompt me to enter without taking me to the page i want to go. wat is wrong with my code? anyone..pls??
ROB posted this at 14:22 — 29th July 2002.
They have: 447 posts
Joined: Oct 1999
at first glance it looks ok, are you using htpasswd to modify the .htpasswd file?
joyce posted this at 00:38 — 30th July 2002.
They have: 164 posts
Joined: Nov 2001
i used the password generator to generate password and save it as .htpasswd. and upload it to a different directory outside the .htaccess file.
zollet posted this at 04:42 — 30th July 2002.
He has: 1,016 posts
Joined: May 2002
joyce,
First of all, if your document root directory is /hom/abc/public_html, then make sure you have the .htpasswd file _outsite_ of your document root directory. Then move your .htaccess file to the directory which you want to protect. Keep in mind that all sub directories will also be protected. Make sure the path in your .htaccess file is correct to the .htpasswd file. Other than that, your .htaccess file looks fine as far as I can see.
Another thing I can think of is that .htaccess files are not shown in FTP clients, so you might have a copy of your .htaccess file in the wrong directory, double check that if you like.
kb posted this at 19:37 — 31st July 2002.
He has: 1,380 posts
Joined: Feb 2002
are you putting the encrypted password like so:
admin:CHWSDADF/14
Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.