Is there a way to redirect to SSL before requiring authentication? This is my current .htaccess file. The problem is that if you go to the non-SSL site, it will prompt for login, rewrite to https, then prompt again for login.
How can I eliminate the first login and just rewrite first? I'm using Apache 2.2.29.
I tried what is mentioned in this post without success: Apache .htaccess redirect to HTTPS before asking for user authentication
RewriteEngine On
RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
AuthUserFile /path_to_passwords/.htpasswd
AuthName "Authorized personnel only."
AuthType Basic
Require valid-user