.htaccess and its importance
.htacess is a filed used by Apache Web server software to effect various configurations to the directory where it is located. It is a hidden file in unix based systems (since its name starts with a dot), and is placed in the root of the directory in which it is supposed to alter the configurations of the web server to allow or limit services. It is basically a file that contains coded information that guides the server on how to execute various functions.
The importance of .htaccess file
- It can regulate the permissions that are used to access certain areas. This can include blocking access to unregistered people, to certain users, or even to some IPs and web crawlers.
- Also, it can be used to give redirection instructions when there are various URLs to the same page. This is helpful for search engine optimisation.
- Also, .htaccess can be used to redirect to error messages whenever the requested file cannot be found.