Ok let's put your file called "htaccess.txt" where it needs to go. Fire up your FTP client and log into the directory you want to protect with passwords. (Cutting a new directory called "test" for this experiment might be a good idea.) Now you have two options, change the name of the .htaccess file on your own computer or change it on the server. It's generally easier to change it on the server.
THIS IS IMPORTANT = Use the ascii transfer option!!!
OK- just ftp that sucker into the directory you want to protect. After your ftp client gets the directory refresh, highlight the file "htaccess.txt" and use the rename function on your ftp client to rename it to: .htaccess That should take care of that.
Moving right along. Using your ftp client change to your cgi-bin directory on sonic. In your main cgi directory upload your passwords.txt file. Then using your ftp client rename the file passwords and that should take care of that!.
Gee I think we're finished! Now off to the test pad.. Grab your crash helmet! In Netscape under "file" choose "New Browser Window". Using Netscape call the directory or a file in the directory you just protected. One of two things will happen... 1)The little "User Name and Password Required" box will pop up. Great we're almost there! Assuming you have written down or remembered a name:password pair correctly. Type in said name:password pair in the user box. and press "OK" Again, one of two things will happen... A)You will get access to the file or directory. Yeah!!! B)You will get an "Authorization Failed Retry?" box. Boo!!! If you get the "Authorization Failed Retry?" box, try it one more time but be darn sure you have the correct name and password. If it still happens it's most likely because: You did not make sure you had a new line (return) at the end of your password file. Make sure you are using the right name/passwords by backing up to the first tutorial page. You transfered the passwords file as a binary file - not good. Reinstall it.
2)You will get "500 - Malformed Header" Ooops - somethings really amiss. Check things in this order: A)Did you put the password file in right place? It should be in the main directory of your CGI area at sonic. If not put it there... B)Did you rename it from "passwords.txt" to "passwords" on the server? It may seem trivial but it's important. I tried to take into account everything that could go wrong and by changing the name to "passwords" with no ".txt" takes care of one of them. C)Look at your original file called "htaccess.txt" does the last line say "-end"? if it does remove it and upload the file to the directory you want to protect, and rename it .htaccess D)Ok, you tried all of the above and no workee. Send me the URL of the directory you want to protect and it should be easy to figure it out. But, please doublecheck your work first!
Some things to consider: While it's fun to have your own private club on the 'net keep in mind the following: People do and will pass on secrets and passwords. So don't put nudie pictures of your honeymoon on the 'net. It ain't smart, bucko. Your significant other may not appreciate showing up in a.b.p.e.girlfriends There are other password programs available on the 'net. If you know how to set up perl scripts, check at Matt's archive and at Selena Sol's page. I also have custom ones if your interested.