moshimoshi52 Posted October 4, 2006 Share Posted October 4, 2006 So, I just installed OSCommerce and had a bit of a doozy trying to protect my admin folder. But, after a while, I figured it out. Just so other people don't have to suffer, I'll tell you how I set mine up: First, I went to www.htaccesstools.com There, I used the ".htaccess Authentication" link and it generated some code. I inserted this code into the top of my .htaccess file in my admin folder (downloading, editing it in Notepad, and then reuploading it). It's important that you get the ".htpasswd File Location" correct (I made it the same location as where I stuck my .htaccess file). Next, ues the ".htpasswd password" link and enter your username and desired password. It will generate an encrypted line of text. This, you put into a new Notepad document, and save it as .htpasswd (make sure there's no .txt extension). This I uploaded into the same folder as the previous .htaccess file. Type in the location of your admin folder... Now, it should all work! I hope this helps! Link to comment Share on other sites More sharing options...
senips Posted October 4, 2006 Share Posted October 4, 2006 I did the same thing. I got the login window but it is not accepting my password. I did not specify the path in the .htaccess file about the passoword file , I just specified the file name alone since it is in the same directory. is that right? AuthUserFile .htpasswd Link to comment Share on other sites More sharing options...
moshimoshi52 Posted October 4, 2006 Author Share Posted October 4, 2006 I did the same thing. I got the login window but it is not accepting my password. I did not specify the path in the .htaccess file about the passoword file , I just specified the file name alone since it is in the same directory. is that right? AuthUserFile .htpasswd I specified the whole path. Maybe that's your problem? Link to comment Share on other sites More sharing options...
digbydo Posted October 4, 2006 Share Posted October 4, 2006 I just installed OSCommerce and had a bit of a doozy trying to protect my admin folder. But, after a while, I figured it out. but... for a busy site, be mindful of Apache's advice: In general, you should never use .htaccess files unless you don't have access to the main server configuration file. There is, for example, a prevailing misconception that user authentication should always be done in .htaccess files. This is simply not the case. Source: apache.org together with a detailed explanation of what .htaccess is and does/doesn't do.. Enjoy!! ;) one-click installation.. Dave's info Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.