0
votes

I have an ASP.net website running under IIS 8.0. The base URL is https://www.example.com. (Certificate is correctly installed for www.example.com and works fine)

The bindings for this website are

  • www.example.com port 80
  • www.example.com port 443
  • example.com port 80

The first rewrite rule in web.config is

<rule name="Redirect to HTTPS" stopProcessing="true">
    <match url="(.*)" />
    <conditions>
        <add input="{HTTPS}" pattern="^OFF$" />
    </conditions>
    <action type="Redirect" url="https://www.example.com/{R:1}" redirectType="Permanent" />
</rule>

The URL https://www.example.com works perfectly. The URL http://www.example.com redirects correctly. The URL example.com redirects correctly.

My problem is : if I try http://example.com, I get a blank page (just containing <html><body></body></html>)

Thanks in advance for help.

Regards,

Guy

1
DO you have another rewrite rules in your web.config? Because i checked your rule and it's working perfectly - Victor Leontyev

1 Answers

0
votes

The error was in the DNS : 2 A records for example.com. One of them was pointing to a disabled previous hosting.