Redirect IIS重定向规则,用于将一个url重定向到另一个url
我知道这已经被问了很多,但我似乎不知道如何让这个工作,甚至在看其他变量。 我需要将www.example.com/article-2重定向到www.example.com/articleRedirect IIS重定向规则,用于将一个url重定向到另一个url,redirect,iis,Redirect,Iis,我知道这已经被问了很多,但我似乎不知道如何让这个工作,甚至在看其他变量。 我需要将www.example.com/article-2重定向到www.example.com/article 很明显,{HTTP_HOST}没有覆盖https://。 请像这样修改规则 <rule name="Redirect Dup Artivcle URL" enabled="true" patternSyntax="ECMAScript" stopProcessing="true"
很明显,{HTTP_HOST}没有覆盖https://。 请像这样修改规则
<rule name="Redirect Dup Artivcle URL" enabled="true" patternSyntax="ECMAScript" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}{REQUEST_URI}" pattern="www.example.com/article-2/" />
<add input="{HTTPS}" pattern="^on$" />
</conditions>
<action type="Redirect" url="https://www.example.com/article/" appendQueryString="false" redirectType="Temporary" />
</rule>
先学会如何调试,然后什么也阻止不了你,