15

I've spent hours trying to solve this so I'm posting as a last resort..

I've tried removing some URL rewrites that were pointing a webpage from HTTP to HTTPS.

Upon deleting the rewrite it is still sending me to HTTPS. I've tried; Manually editing the web.config Restarting website Restarting IIS server Restarting IIS admin service Rebooting server

None of the above seems to stop the rewrite at all..

Is there something I am missing?

moodah
  • 151
  • 1
  • 1
  • 6
  • What browser? I've found FireFox has a knack of caching what url rewrites are doing.... tried a ctrl+f5 to cache clear refresh? I've wasted many hours on this as well.... :) – ianbailey Mar 21 '12 at 13:08
  • Nope - Tried just now Chrome / Firefox / IE8 / IE9 and all results are the same.. – moodah Apr 09 '12 at 12:39
  • I ended up with the same issue where a mistake got placed in the redirected URL, now that the URL is updated and I see the change in the applicationHost.config file I still get the old URL on the server. In the Failed Trace logs I see the old/broken URL being used and failing, even clearing the browser cache and restarting IIS has so far not solved the issue. – MichaelF Jul 11 '12 at 12:27

3 Answers3

21

I had the same problem with IIS express - removing rewrite section from web.config was unsuccessful. Solution - clean a browser's cache.

Brian Mains
  • 50,520
  • 35
  • 148
  • 257
eLVik
  • 741
  • 7
  • 14
2

Have you checked server level rules? Can be found in IIS Manager, click server node and then Url Rewrite module or directly in the IIS config file located:

C:\Windows\System32\inetsrv\config\applicationHost.config
Tomek
  • 3,267
  • 2
  • 22
  • 23
  • I'm assuming you mean the the server in the 'connections' tree. I only have one in there which contains the 'sites' folder under which all the configurations for my websites are. I've checked the 'url rewrites' at the server level and there are none. There are no rewrites to https in either of my website configs either. :( – moodah Apr 09 '12 at 12:42
  • In my case, this was exactly the solution! Not quite sure why it was added as a global rule and not at the application-level, but anyway, thank you. – Pat Migliaccio Jan 11 '18 at 16:18
1

It seems that there is an output cache that caches the redirect response before it reaches the URL rewrite rules again. It can be turned off:

<system.webServer>
    <caching enabled="false" enableKernelCache="false" />
</system.webServer>

Be aware though that this is output cache for the whole application, so it might affect something else. In any case it can be utilized and then commented out to clean the state of url rewrite rules.

Ilya Chernomordik
  • 27,817
  • 27
  • 121
  • 207