Discussion Locked

.htaccess Anyone?

0 helpful
3 replies
Closed to new repliesThis discussion is closed. It stays readable, but it takes no new replies.

Here we go. I've read numerous guides and visited website on how to use .htaccess to password protect certain directories in a public website.

The problems I'm having are the following:

Knowing specifically where each file goes in the setup. Basically the three files I'm looked at are: .htaccess, .htpasswd, .htgroup.

Do all of them go in the directory needing the protection? Or do you break them up in the site and put the .htpasswd and .htgroup files in a private directory on your server, outside of your public_html file?

Also, I don't know how to use the telnet program and don't know if I even can. I need this to help me build the encrypted passwords correct?

Thanks for your help.

Jason

3 replies

by eduardo

You should place the .htaccess file within the protected directory. The paths to the .htpasswd and .htgroup is specified in the .htaccess file so you can place those somewhere else. You do not need to have telnet access to be able to set up the password files. Although you may telnet if the server has telnet service on it. You can just create the files with notepad (just make sure that the .txt extension is not hidden.) Once you have created the files, you can FTP them to the site but make sure that you set your FTP client to ASCII mode when you upload them. Don't forget to chmod the .htaccess files to 644.

This discussion is closed to new replies.