.htaccess is simply a tool for specifying Apache configuration directives for each directory. They allow you to use various types of password protection.
If you are talking about basic HTTP authentication, then the username and password are sent in clear text with each request and can be sniffing (if you are not using SSL).
In addition, they are prone to the usual problems that any password-based system suffers from.
Using HTTP Basic Authentication does not provide users with additional options for downloading and executing files. If they can do it, then they can do it anyway. If they cannot, they cannot.
source share