I have a website that doesn’t seem to redirect from non-www to www onnly in one condition.
if i type https://example.com it dosen’t redirect
and if id write http://exmple.com or example.com without http it works great
i wrote this to my htaccess

Force https and www:

    RewriteEngine On
    RewriteCond %{HTTP_HOST} ^example.com [NC]
    RewriteRule ^(.*)$ http://www.example.com/$1 [L,R=301,NC]
    RewriteCond %{HTTPS} off
    RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [R,L]

any help will be appreciated

Read more here: redirect from non-www to www


If you know the solution of this issue, please leave us a reply in Comment section, to update the question.

Wordpress related questions and answers: