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