Premium Member Database last update: Wednesday, September 28, 2016 22:02:47 GMT-0700

What are .htaccess files?

.htaccess files (or "distributed configuration files") provide a way to make configuration changes on a per-directory basis. A file, containing one or more configuration directives, is placed in a particular document directory, and the directives apply to that directory, and all subdirectories thereof.1

Using .htaccess files will allow you to control several aspects of your web directories, including authentication, security, error pages, access control lists and many others.

Apache documentation recommends that utilizing the main server configuration file is preferable to using .htaccess. But, as many webmasters do not have permission to edit the main server configuration file, .htaccess files can be used as an alternative.2

1 http://httpd.apache.org/docs/2.0/howto/htaccess.html What they are/How to use them
2 http://httpd.apache.org/docs/2.0/howto/htaccess.html When (not) to use .htaccess files