繁体   English   中英

IIS 重写规则以重定向 url

[英]IIS rewritten rule to redirect a url

我有一个 SSL 网站,我想将所有调用重定向到不同的 SSL 网站,包括 POST 数据。 经过几次尝试,都没有成功。 任何建议这是我到目前为止所拥有的。

<rule name="Redirect url" enabled="true" stopProcessing="true">
    <match url="(.*)" ignoreCase="true" />
    <action type="Redirect" url="https://localhost"   appendQueryString="false" redirectType="Permanent" />
</rule>

如果您还需要在目标URL末尾的append请求URI,请像这样修改规则。

<rule name="Redirect url" enabled="true" stopProcessing="true">
    <match url="(.*)" ignoreCase="true" />
    <action type="Redirect" url="https://localhost/{R:1}" appendQueryString="false" redirectType="Permanent" />
</rule>

暂无
暂无

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

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