What is an .htaccess file?

The .htaccess file is a file which is read by Apache (if exists) prior to incoming client request being fulfilled. Your .htaccess file can tell Apache to do certain things, overriding the global configuration for the webserver. The "rules" outlined in the .htaccess file will preside over the directory where the .htaccess file is located and every directory inside of it. Some simple examples of manipulation the webserver include the ability to redirect requests to a different URL, directory index manipulation, error documents, etc.

Important Note: Any incorrect syntax in your .htaccess file will lead to the webserver returning a strange error when you try to visit your website. Therefore, you need to be sure to use proper syntax when writing to your .htaccess file.

  • 1 Users Found This Useful
Was this answer helpful?

Related Articles

What Operating Systems does Hostwire use for its UNIX webservers?

Our servers run various Unix flavors, such as Redhat, CentOS, Ubuntu and FreeBSD.

How can I change the index listing in a directory?

You can change the initial page that is sent to client requests when a directory is accessed by...