简体   繁体   English

IIS 重写规则以重定向 url

[英]IIS rewritten rule to redirect a url

I have a SSL website that I want to redirect all calls to a different SSL site including POST data.我有一个 SSL 网站,我想将所有调用重定向到不同的 SSL 网站,包括 POST 数据。 After several attempts, no success.经过几次尝试,都没有成功。 Any suggestions This is what I have so far.任何建议这是我到目前为止所拥有的。

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

If you also need to append request URI in the end of target URL, please modify the rule like this.如果您还需要在目标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