.htacess file is used to solve the canonicalization issue of a website. It may happen that the home page of the site may take several urls like http://www.example.com or http://www.example.com/index.html or http://example.com . The search engines might treat these url as different and may divide the link juice gained by having various backlinks made with any of these 3 urls. The link juice gets divided between these three urls equally. .htacess file is created to have a single url of the home page so that the link juice is passed onto single url.