Before you can start using any htaccess commands and functions, it is important to know how to create a .htaccess file. Surprisingly this actually causes people lots of problems. Most Operating Systems, Windows in particular, will not accept the file name .htaccess when you go to try to save the document. This error seems to have been fixed in Windows XP SP2, however certain people still seem to come upon errors when saving in this format.
If you are encountering errors with saving your .htaccess file, go ahead and save your file as htaccess.txt. Then upload the file to your web server using your favorite FTP program. Once your file is on the server go ahead and rename the file to .htaccess.
If for any reason you encounter errors when trying to rename your file to .htaccess then your host may not support htaccess files. Many hosts support .htaccess but don’t actually publicize it and many other hosts have the capability but do not allow their users to have a .htaccess file. As a general rule, if your server runs Unix or Linux, or any version of the Apache web server it will support .htaccess, although your host may not allow you to use it. Your best choice here is to email or call your host and ask them directly if they support .htaccess files.