Forum Moderators: mack

Message Too Old, No Replies

.htaccess crisis!

         

tomthumb

11:49 pm on Mar 24, 2004 (gmt 0)

10+ Year Member



Im trying to build a password protected area and have created the .htaccess and .htpasswd files and loaded them to the FTP server.

When I got to the site and click the link, the password box comes up though says i've entered the wrong password when I try to get in.

Anyway, I think it's something in the "AuthUserFile" part of the script in the .htaccess file.

Could anyone let me know, in idiots language, what the path here should be?

Any help would be great

mack

2:02 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



AuthName Your-protected-area
AuthType Basic
AuthUserFile /path/to/your/file/called/.htpasswd

The file path is not a "web url" it is a serer path. If you are unsure of the path you should contact you host.

It may be possible that you host does not support htaccess.

Hope this is of some help. Perhaps someone with a little more info on this will chime in. :)

Mack.

coopster

2:29 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member



You have to create the password on the server that will be using the
.htpasswd
file, you can't key it into a text file and FTP it over. Apache has a utility for this called htpasswd [httpd.apache.org].

ukgimp

2:42 pm on Mar 25, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



just a guess but i reckon you may have problems when you coem to edit the file or delete it. When you cant see the file in ftp application you need to ype in "-la" in the white empty box.

Had me that did once.

tomthumb

2:49 pm on Mar 25, 2004 (gmt 0)

10+ Year Member



thanks guys (or girls) - i think i've cracked it with that advice.

I was doing a number of things wrong (including FTPing it over as a normal file an using a URL as the path!)

Oh well, live and learn