you cannot use an .htaccess file as we do not provision a server for you in that way. Netlify is really only for modern static sites - more information on that here:
that said, we you could explore redirects or access control to achieve what you are trying to do: