简体   繁体   English

无法从IIS7中删除URL重写

[英]Unable to remove a URL rewrite from IIS7

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. 我已经尝试删除一些将网页从HTTP指向HTTPS的URL重写。

Upon deleting the rewrite it is still sending me to HTTPS. 删除重写后,它仍然会将我发送到HTTPS。 I've tried; 我试过了; Manually editing the web.config Restarting website Restarting IIS server Restarting IIS admin service Rebooting server 手动编辑web.config重新启动网站重新启动IIS服务器重新启动IIS管理服务重新启动服务器

None of the above seems to stop the rewrite at all.. 以上都没有似乎完全停止重写..

Is there something I am missing? 有什么我想念的吗?

I had the same problem with IIS express - removing rewrite section from web.config was unsuccessful. 我遇到了与IIS Express相同的问题 - 从web.config中删除重写部分是不成功的。 Solution - clean a browser's cache. 解决方案 - 清理浏览器的缓存。

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: 可以在IIS管理器中找到,单击服务器节点,然后单击Url Rewrite模块或直接在IIS配置文件中找到:

C:\Windows\System32\inetsrv\config\applicationHost.config

It seems that there is an output cache that caches the redirect response before it reaches the URL rewrite rules again. 似乎有一个输出缓存在再次到达URL重写规则之前缓存重定向响应。 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. 在任何情况下都可以使用它然后注释掉以清除url重写规则的状态。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM