0

I am doing a redirect from all domains to a single domain and then forcing it to HTTPS. All works for domains not entered with https: but when someone enters in the full url like https://www. the browser gives a certificate error. Below is my htaccess.

RewriteBase /

RewriteCond %{HTTP_HOST} ^www\.(.*)$ [NC]
RewriteRule ^(.*)$ https://%1/$1 [R=301,L]

RewriteCond %{HTTPS} !=on
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]

Why is this not working for https requests? I am also using Parallels could there be a setting in that I am missing?

Haru
  • 1,361
  • 2
  • 15
  • 40
  • Are you wanting to redirect everyone to https:// url instead of https:// www.url ? – Edward Apr 27 '16 at 16:29
  • Yes so I am removing the www if they enter it. – Haru Apr 27 '16 at 16:29
  • Does your SSL certificate support both https www and https? I know some don't as a while ago, I bought one that didn't. Here are some things I found: http://serverfault.com/questions/367818/redirecting-ssl-without-raising-an-alert and http://stackoverflow.com/questions/27673013/redirecting-https-www-to-https-non-www-without-seeing-certificate-error-p – Edward Apr 27 '16 at 16:31

0 Answers0