jayc Posted May 13, 2006 Posted May 13, 2006 I need to set up directory protection for a single directory on a site I am developing for a client. In reading the forums I have figured out a work around for the time being, by using Cpanel>webprotect. However I am still wondering why my initial effort to hand build an htacess file did not work. I created an htaccess file and put it into the desired directory, I also used a third party site to create the username:password combinations and put it in the same directory Whenever I attempted to access the directory I got the login screen, but it would not accept the password I put in. After using Cpanel>webprotect I checked the password file that was generated and noticed that it contained a different encrypted password than the one generated by the third party script. I suspect that what I was doing wrong with the line with the full path to the location of the password file in the .htaccess file. Can anyone point me at a tutorial or previous post on how to hand build a .htaccess based system that has some examples in it ? Thanks in advance jayr Quote
Deverill Posted May 13, 2006 Posted May 13, 2006 I'm not sure a third party password creator will use the exact same algorithm as the server here does. Also, the same password can be represented by a bunch of different strings the way Unix passwords are generally created. I suspect the same is true of htpasswd. Quote
cajunman4life Posted May 13, 2006 Posted May 13, 2006 If I remember correctly, when building an .htaccess file, you use the command htpasswd from the command line. Since we don't have shell access on shared accounts, you must use cpanel to create the .htaccess file in this case. I'm not 100% sure, but the generated password may be different on different machines (I could be totally off base here). None the less, I would recommend going through cpanel to set up directory locking. Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.