my wordpress site(s) are infected in this very manner, but cleaning them does not solve the problem. When I download the .htaccess file, clean it, and upload it again, it immediately becomes infected. I download it again and 'bam,' infected.
So apparently in my case there is other malicious code that can not only detect when the .htaccess is modified, but actively revert it back to its infected state.
I am also having this issue. When I modify or even remove the htaccess file(s), they reappear moments later with the offending code. Any advice?