如何防止htaccess在重定向时触发两次

I have the following problem. My website "www.mysite.com" is currently protected by a htaccess password. So when I visit "www.mysite.com" a window pops up and I fill in my password. However, after that I get redirected to "mysite.com" (without the "www") and I get asked to type in the password again.

This is my current htaccess file:

AuthName "My Site"
AuthType Basic
AuthUserFile w123456/mysite.com/.htpasswd
require valid-user

Just a normal password request. It's in the same directory of the index.php. The whole thing is a wordpress installation. Maybe I need to add something, so it doesn't trigger twice?