In several web servers most commonly Apache, .htaccess is the default name of a directory-level configuration file that allows for decentralized management of web server configuration. The .htaccess file is placed into the web tree, and is able to override a subset of the server’s global configuration; the extent of this subset is defined by the web server administrator.The original purpose of .htaccess was to allow per-directory access control hence the name. Nowadays .htaccess can override many other configuration settings, mostly related to content control, e.g. content type and character set, CGI handlers, etc.
In the Apache web server, the format of .htaccess is the same as the server’s global configuration file; other web servers implement the same syntax, even though their configuration files are very different. Directives in the .htaccess file apply to the current directory, and to all sub-directories , but for reasons of performance and security, cannot affect their parent directories.
The file name begins with a dot because dot-files are by convention hidden files on Unix-like operating systems.
How to create a .htaccess file ?
Creating a .htaccess file may cause few problems. The easiest portion is writting the file , you just need to enter the appropriate code into a note pad . You may run into difficulties with saving the file. Because .htaccess is a strange file name with a 8 letter file extension, it may not be accepted on certain systems e.g. Windows 3.1. With most operating systems, though, all you need to do is to save the file by entering the name as:”.htaccess”.