The main purpose of .htaccess file was to allow per-directory access control.".htaccess" files affect the directory and sub-directories in which it is placed.
Redirects enable us to control the flow of visitors. you can protect directories and redirect the traffic to other pages.
The password protection and authentication is most important use of .htaccess files. The login procedure for these directories is automatically handled by the web browser using a pop-up login interface.
We can block visitor based on the host name or host address.This is extremely useful for blocking unwanted visitors, or to only allow the web site owner access to admin section of the web site.
Creating custom error very useful feather of htaccess file. it gives deliver sensible message to our visitor.
It is possible to force any media files are treated as a download, rather than to be played by the browser.
Gzip is used to compresses files before sending them over to the browser. Gzip Compression help you lot to optimize your webpages because it reduces the size of your webpages and style sheets by up to 70%.