繁体   English   中英

具有完全匹配的https url的IIS重写规则导致错误

[英]IIS rewrite rule with exact match https url results in error

我已经将网站从ASP.NEt Webforms转换为MVC 5,并成功编写了重定向所有旧.aspx页的规则-除了唯一的加密页。

我非常感谢帮助纠正此规则,该规则导致了net :: ERR_CORRECTION_RESET

<rule name="https link" stopProcessing="true" patternSyntax="ExactMatch">
<match url="https://www.mysite.org/ssl/securedonation.aspx" />

 <action type="Redirect" url="/donate/" redirectType="Permanent"/>
</rule> 

我怀疑我需要添加一个条件,但是还无法弄清其语法或功能。

非常感谢。

仅当您只想在https而不是http上进行匹配时,才需要添加条件。 但是对于您而言,我认为这无关紧要。 您只需将secureonation.aspx页面重定向到/ donate /,就不必仅仅因为它使用https而将其区别对待。 尝试这个:

<rule name="https link" stopProcessing="true" patternSyntax="ExactMatch">
    <match url="ssl/securedonation.aspx" />

    <action type="Redirect" url="/donate/" redirectType="Permanent"/>
</rule> 

暂无
暂无

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

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