I have installed WordPress on my IIS server and I also have the SSL Certificate installed.
I have researched every thread I could find on this, but still couldn't get it work. I found this thread from a guy on Apache who is facing the same issue, but I am on IIS and don't know how to get it to work with IIS.
Similar to that thread, here is what is happening:
https://www.example.com is working great
https://example.com is redirecting to the above, also great!
Here is the problem:
http://www.example.com is still accessible, no good, as this should redirect to https://www.example.com
Also:
http://example.com redirects to http://www.example.com.
How can I fix this, so that it all redirects to https://www.example.com?
I am on IIS and here is what my web.config looks like:
<?xml version="1.0" encoding="UTF-8"?>
<configuration>
    <system.webServer>
        <rewrite>
        <rules>
            <rule name="WordPress Rule" stopProcessing="true">
                <match url=".*" />
                <conditions>
                    <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                    <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                </conditions>
                <action type="Rewrite" url="index.php" />
            </rule>
        </rules>
        </rewrite>
    </system.webServer>
</configuration>
 
     
    