我对重写部分很陌生,希望有人能帮助我。现在,我正在使用以下代码
<rewrite>
<rules>
<rule name="Imported Rule 1" stopProcessing="true">
<match url="^(.*)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll">
<add input="{HTTPS}" negate="true" pattern="^on$" ignoreCase="false" />
</conditions>
<action type="Redirect" url="https://{SERVER_NAME}/{R:1}" redirectType="Found" />
</rule>
</rules>
</rewrite>这只能把http改成https,现在我希望它也能支持把www改成非www。我该怎么做才能做到呢?
发布于 2015-04-13 14:48:39
为什么来自web.config?您应该从IIS允许它-只需添加它即可。
https://stackoverflow.com/questions/29597716
复制相似问题