.htaccess is the default name for a file that is used to indicate who can or cannot access the contents of a specific file directory from the Internet or an intranet. The .htaccess file is a configuration file that resides in a directory and indicates which users or groups of users can be allowed access to the files contained in that directory.
.htaccess works on all of our Linux hosting accounts.
Some examples of what a .htaccess file can be used for are:
- Customize the error pages for your site
- Protect your site with a password
- Enable server-side includes
- Deny access to your site based on IP
- Change the default page (index.html) that is loaded for your site
- Redirect visitors to another page
- Prevent directory listing
- Add MIME types
A .htaccess file is a simple text file with the name .htaccess. It is not a file extension like .html or .txt, as the entire file name is .htaccess. For more information on how to set up .htaccess files, visit Apache’s website.