Use it for questions about the configuration file used from the Apache server, the .htaccess file.

The .htaccess file is a configuration file for the Apache web server, allowing configuration settings to be made at a directory-specific level, overriding the server-wide or site-level settings in the main Apache server-level configuration.

Most directory-specific (though not all) Apache settings can be configured in .htaccess. One of the most common usages for it is URL redirection using mod_rewrite, which is used by many sites for SEO purposes and to provide easier-to-read URLs. The Apache documentation also has further information about mod_rewrite.

.htaccess files can also be used for specifying custom error pages (e.g. for 404 errors); directory-specific security and user authentication; configuring the PHP installation; file handlers and MIME types; output compression, and more.

For more information on .htaccess files and how to use them, see the Apache documentation.

history | excerpt history