I have certificate for www.example.com
It's working for now.
I want to redirect all requests with 'www' and non 'www' to https with 'www'
http://www.example.com to https://www.example.com
http://example.com to https://www.example.com
https://example.com to https://www.example.com
I am getting error that, 'Certificate is only valid for www.example.com'
How can i make redirections?
What i tried?
RewriteEngine On
RewriteCond %{HTTPS} !on
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
It's working on chrome. On firefox https://example.com is giving error that.
Your connection isn't secure.
I tried to clear history and cache for firefox. It's quite same.