3

I have the following rule defined in my Web.config:

<rule name="Enforce canonical hostname" stopProcessing="true">
    <match url="(.*)" />
    <conditions>
        <add input="{HTTP_HOST}" negate="true" pattern="^www\.mydomain\.org$" />
    </conditions>
    <action type="Redirect" url="http://www.mydomain.com/" redirectType="Permanent" />
</rule>

What I am experiencing is strange...

It appears that I am being redirected to https://www.mydomain.com/ which causes my browser to hang. I do not have SSL encryption turned on, nor do I have any special authorization rules. The web server in question is behind an F5 load balancer.

Any ideas?

Derek Hunziker
  • 197
  • 1
  • 1
  • 8

2 Answers2

0

Enable Failed Request Tracing for the site, and trace on any response code (100-500 works for me), with all options on.

Once you've got the log, use the Compact view, and check that what you're being handed as input and what you're sending as output actually jives with what your rules expect to see.

If the web server finishes with a 301/302 http://www.example.com , you know* your problem is external.

I can't speak for F5, but with ISA, if you traverse a connection as HTTPS once, it'll upgrade/redirect subsequent requests to HTTPS to avoid cookie-in-the-clear type scenarios.

TristanK
  • 8,953
  • 2
  • 27
  • 39
0

The load-balancer was rewriting redirects to always be HTTPS. See Possible to redirect from HTTPS to HTTP behind load-balancer? for more info.

Derek Hunziker
  • 197
  • 1
  • 1
  • 8