Below is the explanation of htaccess File.
1) (hypertext access) file is a directory-level configuration file supported by several web servers, that allows for decentralized management of web server configuration.
2) The original purpose of .htaccess - reflected in its name - was to allow per-directory access control, by for example requiring a password to access the content. Nowadays however, the .htaccess files can override many other configuration settings including content type and character set, CGI handlers, etc.