The full form of . htaccess is Hypertext Access. This file used by apache based web servers for to controls the directory that it “lives” in–as well as all the subdirectories underneath that directory.
.htaccess file include the ability to password protect folders, ban users or allow users using IP addresses, stop directory listings, redirect users to another page or directory automatically, create and use custom error pages, use a different file as the index file by specifying the file extension or specific file.
Your .htaccess file needs to be a plain text file. This means you need to make it in a text editing program capable of producing plain text files.
.htaccess files in any directory of our site allows us to set up a finely-grained tree of server directives, each subfolder inheriting properties from its parent, whilst at the same time adding to, or over-riding certain directives with its own .htaccess file.