Htacess Question

liunx

Guest
I need to set up directory protection for a single directory on a site I am developing for a client.<br /><br />In reading the forums I have figured out a work around for the time being, by using Cpanel>webprotect.<br /><br />However I am still wondering why my initial effort to hand build an htacess file did not work.<br /><br />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<br /><br />Whenever I attempted to access the directory I got the login screen, but it would not accept the password I put in.<br /><br />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.<br /><br />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.<br /><br />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 ?<br /><br />Thanks in advance<br /><br />jayr<!--content-->
I'm not sure a third party password creator will use the exact same algorithm as the server here does. <br /><br />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.<!--content-->
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.<!--content-->
 
Back
Top