URL Rewrite is adding HTTPS to my canonical redirects in IIS7

Posted by Derek Hunziker on Server Fault See other posts from Server Fault or by Derek Hunziker
Published on 2011-03-18T22:14:10Z Indexed on 2011/03/19 0:12 UTC
Read the original article Hit count: 830

Filed under:
|
|

Hello,

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?

© Server Fault or respective owner

Related posts about iis7

Related posts about redirect