This is almost always due to your AllowOverride directive being set incorrectly for the directory in question. If it is set to
None then .htaccess files will not even be looked for. If you do have one that is set, then be certain it covers the directory you are trying to use the .htaccess file in. This is normally accomplished by ensuring it is inside the proper Directory container.