Jump to content
Sign in to follow this  
Little Goat

.htaccess & .htpasswd

Recommended Posts

hey, I was thinking of having a directory on a site I'm building where if you know the password you can open a php script that lets you open and edit the files on the server. I was wondering, how secure is the htaccess and htpasswd stuff? cause I dont want people to edit the files unless it is me.LG

Share this post


Link to post
Share on other sites

.htaccess files are always accessable as long as you don't use HTTP or HTTPS to acces them (after all, that's where the name comes from). If you connect to the server via FTP, you could see and download the .htaccess files for example. I'm not sure how the things go if via HTTP or HTTPS you access a folder with .htaccess file which doesn't target the folder itself.As for .htpasswd... as far as I know, such files are placed out of the server's directory, thus are inacessable in any manner via HTTP or HTTPS. If FTP or other protocol has access to the outside folder where the .htpasswd file resides however, the file would be accessable.Conclusion: yes. Such things are relatively safe to use, especially when talking about having access only for yourself.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×