If you are caching files by extension then the reason that doesn’t work with htaccess is because it doesn’t have an extension.
Any Linux file can have a dot prepended on the front to indicate that the file should be hidden and not included in directory lists unless the option to include hidden files is used.