Using the .htaccess you can make sure that the URLs are more user and search engine friendly.
You can remove the extensions like .php, .html, .htm, with the help of .htaccess
You can Redirect the user to different page or domain.
You also redirect the domain from http to https
Blocking the Ip by countries or series of IPs.
password protection for the specific Directories.
And many other uses like DirectoryIndex, Adding MIME types, you can enable CGI outside of the CGI-bin, disable directory listings, help in setting server timezone and Changing server signature, you can also prevent access to PHP includes files and php.ini and you can also prevent requests with invalid characters Now we will see how to remove extensions using .htaccess: To remove the .php extension from a file, for example, Domain.com/admin.php to Domain.com/admin you have to add the mentioned below code in the .htaccess file.Rewrite URL’s, error logging, hotlink prevention techniques