Htaccess... first force www than ask for login

Posted by FinalFrag on Stack Overflow See other posts from Stack Overflow or by FinalFrag
Published on 2010-04-28T16:36:59Z Indexed on 2010/04/29 7:37 UTC
Read the original article Hit count: 288

Filed under:
|
|

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.

© Stack Overflow or respective owner

Related posts about htpasswd

Related posts about htaccess