Mr. Kraus
Mr. Kraus

Reputation: 8145

How do you turn off URL Rewrite rule for Visual Studio 2015 F5 debugging?

I have an app that has a URL Rewrite rule to force HTTPS when in production.

<rewrite>
  <rules>
    <rule name="Force HTTPS" enabled="true">
      <match url="(.*)" ignoreCase="false" />
      <conditions>
        <add input="{HTTPS}" pattern="off" />
      </conditions>
      <action type="Redirect" url="https://{HTTP_HOST}/{R:1}" appendQueryString="true" redirectType="Permanent" />
    </rule>
  </rules>
</rewrite>

I tried debugging locally and it would always redirect to https://localhost:port.

So I tried setting enabled="false", then commented out the node, then deleted completely. restarted VS, killed IIS Express, rebooted, but now it will always redirect to https:// for this app.

How do you turn off a rewrite rule for Visual Studio debugging?

Upvotes: 4

Views: 1202

Answers (1)

Mr. Kraus
Mr. Kraus

Reputation: 8145

Turns out that the browser caches this rewrite and was the culprit for redirecting me to https:// each time i went into debug mode.

after clearing my history and cache, it no longer redirects me to HTTPS

Upvotes: 7

Related Questions