Htaccess... first force www than ask for login
- by FinalFrag
I have an .htaccess file that mainly does 2 things. Force www on the domain and ask for login credentials (with .htpasswd).
If I now visit domain.com it will ask for a username and password. When I fill them in I get redirected to www.domain.com and then it asks me to log in again.
Is there any way to get the www redirection done before the login? I already tried putting the force www code on the top of the .htaccess file.