Disclosure: Hosting Canada is community-supported. We may earn a commission when you make a purchase through one of our links. Learn more.

.htaccess definition: What is it?

We can define .htaccess as config file (configuration file) that is being used on the web server for running the software called Apache Web Server.

When you place the file .htaccess in a particular web directory, it is loaded through the Apache software and the .htaccess file is then get detected and the instructed execution is done accordingly by Apache Web Server software. The Apache Web Server configuration can be altered by the .htaccess files to disable/enable the additional functions and features offered by the Apache software.

It includes the basic redirect function, for example, when 404 error happens, or advanced functionalities such as image hotlink prevention and password protection of content.