简体   繁体   English

禁用 URL 重写规则

[英]Disable URL Rewrite rules

I am using window server 2003 sp2 and IIS 6, I have used URL rewrite for url rewriting, I am having trouble in installing URL rewritter in IIS 6 so I want to disable the rules temporarily我正在使用 window server 2003 sp2 和 IIS 6,我使用 URL rewrite 进行 url 重写,我在 IIS 6 中安装 URL rewritter 时遇到问题,所以我想暂时禁用规则

How can I disable URL rewriting temporarily, Is there something I need to add in web.config?如何暂时禁用 URL 重写,是否需要在 web.config 中添加一些内容? Regards问候

You can disable each rule individually using the enable attribute of the rule tag.您可以使用规则标记的 enable 属性单独禁用每个规则。 For example,例如,

<configuration>
    <system.webServer>
        <rewrite>
            <rules>
                <rule name="myRule" enabled="false">
                    ...
                </rule>
            </rules>
        </rewrite>
    </system.webServer>
</configuration>

The key part is the enabled="false".关键部分是 enabled="false"。 If omitted, this value defaults to true.如果省略,则此值默认为 true。

There is no corresponding attribute in the rules (plural) tag to toggle all rules at once.规则(复数)标签中没有相应的属性来一次切换所有规则。

您需要注释您的<rewrite>标记以禁用 IIS URL 重写。

Your browser will still remember the rule even after you remove it.即使您删除了该规则,您的浏览器仍会记住它。 So make sure to also clear browser history, cookies, form data, etc...所以一定要清除浏览器历史记录、cookies、表单数据等......

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

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