.htaccess files are an integral part of any basic authentication process. The file lives within a directory on the server and is used to enact the authentication process when the directory is accessed. The
.htaccess file is then checked against a file that contains an encrypted instance of the valid password for the directory.
.htaccess files also contain information about how the contents of the directory will be displayed, as well as information about how long visitors’ browsers will “cache” your site, or save it in memory.