The .htaccess file is the default directory-level configuration file on Apache servers. They are also known as “distributed configuration files.” Configuration directives contained in the .htaccess file apply to the directory in which the file is placed as well as all of its subdirectories. Within the .htaccess file things like authorization and authentication, rewriting of URLs, cache control and customized error responses can all be specified.