The .htaccess means hypertext access file, it is a directory-level configuration file.
Htaccess generator to get the configuration of htaccess easier. it could configurate the Authentication, Custom error pages, Image hotlink protection, Block IP and domains, Redirect by language, Redirect by mobile device and so on.
For example, when you want to add trailing slash to URLs, and Redirect from www subdomain to main on this domain www.mefancy.com. then the generator will get the code like below:
RewriteEngine on AuthType Basic AuthName "My protected area" AuthUserFile /absolute/path/to/.htpasswd Require valid-user RewriteCond %{HTTP_HOST} ^www.www.mefancy.com [NC] RewriteRule (.*) http://www.mefancy.com/$1 [L,R=301] RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^(.*[^/])$ /$1/ [R=301,L]