visit http://mywptest.happysandwich.com and you will get a popup asking for credentials that looks like this: http://imgur.com/qb21tad
It’s possible you have a wordpress plugin installed that interferes, but wordpress itself does not. (mywptest above is in fact just a WP install I keep around for trying things).
This type of login really isn’t secure. It’s most often used for dev or test sites where you might not want people just clicking around. It also keeps search bots (like google bot) from indexing, which might be important if you have not quite yet ready for public display stuff, or in the case of a copied site for DEV then your search rankings don’t get penalized for duplicate content on multiple sites.
AuthName "Test Site"
Deny from all
Allow from XXX.XXX.XXX.XXX
I changed the USERNAME for this example, It would be the username you log into ftp with. this is set so that .htpasswd actually resides in the users home directory. Whereas the actually .htaccess is located at /home/USERNAME/mywptest.happysandwich.com/.htaccess
This also has an IP exception built in. I can replace the XXX.XXX.XXX.XXX with an acctual IP (for example my local connection’s external IP) and then that IP does not have to use a password, it simply gets free access.