My site just got its EV SSL certificate. In the past I've redirected non-www requests to www using htaccess - and it worked well.
But now, if I request a https page, I end up (via the htaccess redirect) on the http version.
I need htaccess to redirect like this: non-www redirects to www, while preserving the http or https
Here is the htaccess file I'm using now:
Options +FollowSymLinks
RewriteEngine on
RewriteCond %{HTTP_HOST} ^[^.]+\.[^.]+$
RewriteCond %{HTTPS}s ^on(s)|
RewriteRule ^ http%1://www.%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
It isn't working right. The https requests are being redirected to http.
Try this: