Htaccess File can be described as a configuration file that is used on web servers that are run by Apache Web server software. The htaccess file is normally placed in a directory and the directory is loaded on the Apache Web server. Once the htaccess is detected the Apache web server will execute it immediately.
Htaccess is also referred to as “Hypertext access” and it is a configuration file that simply controls the directly in which it is found. Htaccess also controls the sub-directories under the main directory it is found.
What can we do with Htaccess File:
- Make 301 redirect and other redirect types from one page to another.
- Rewrite your URLs to appear SEO friendly.
- Specify custom error pages for example for 404 error.
- Blocking users by using IP or by domain.
- Control folder listing when the visitor try to browse a real folder.
- Control the web browser caching.
- Adding MIME types.
- Folder password protection
This is the most common functions for it, there is many other uses.