Web Design & Development Guide
Access) is the default name of Apache's directory-level
configuration file. It provides the ability to customize configuration
directives defined in the main configuration file. The configuration
directives need to be in .htaccess
context and the user needs appropriate permissions.
Statements such as the following can be used to configure a server to send
out customized documents in response to client errors such as "404
Not Found" or server errors such as "503: Service Temporarily Unavailable"
ErrorDocument 404 /error-pages/not-found.html
ErrorDocument 503 /error-pages/service-unavailable.html
A .htaccess file controls the directory it is in, plus all subdirectories.
However, by placing additional .htaccess files in the subdirectories, this can
The user permissions for .htaccess are controlled on server level with the
AllowOverride directive which is documented in the Apache Server
Some web developers have modified .htaccess to perform custom tasks
server-side before serving content to the browser. Developer Shaun Inman shows
it is possible to edit .htaccess to
allow for Server Side Constants within