• Hello Everyone,

    I have a domain that I am 301 redirecting to https://www.example.com using .htaccess file as shown below:

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

    It is working fine when typing example.com and https://www.example.com.

    But it doesn’t work with https://example.com. It does not redirect to the version with www.

    I have tried many other rules, but nothing is working. Help on this would be much appreciated.

  • The topic ‘Redirect https://example.com to https://www.example.com’ is closed to new replies.