I have .htaccess:
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI}
RewriteCond %{HTTP_HOST} ^www\.(.+) [NC]
RewriteRule ^(.*) http://%1 [R=302,NE,L]
It works ok when I have redirection from (example): from http:// is redirect to correct https:// from http://www is redirect to correct https:// but when I have https://www. I don't have redirection and "non trusted connection".
What I should change in my htaccess file?
Just redirect to https on your second rule too, e.g.
Not related, but you don't need to capture the path, only use
REQUEST_URI
.