The .htaccess file is a very useful file. You can use it to control how your website works. Some of the functions include customizing error page displayed, restrict search engine bot access, setting restrictions to folders and rewriting URLs for SEO purposes.
I stumbled upon htaccessEditor, a web tool that allows you to easily generate a basic .htaccess file for your website. Just select the options that you need from the menu and the .htaccess file will be automatically generated for you. Copy the text into your .htaccess file and save it.
Another .htaccess generator with more features is the htaccess file Generator by cooletips.de. This web tool doesn’t look as attractive as the previous one but it offers more options for you to tweak.