我想在IIS 10中编写重定向规则。我搜索了它,但找不到合适的解决方案。
我增加了更多的场景。
https://testing.app.com/apptest应该重定向到https://testing.app.com/apptest/account/loginhttps://testing.app.com/apptest/应该重定向到https://testing.app.com/apptest/account/loginhttps://test-apptest.testing.app.com/应该重定向到https://test-apptest.testing.app.com/account/loginhttps://test-apptest.testing.app.com应该重定向到https://test-apptest.testing.app.com/account/login如果有人能帮我做这件事,我很感激。
到目前为止,我尝试的是:
<rewrite>
<rules>
<rule name="Test1" stopProcessing="true">
<match url="apptest/login" />
<action type="None" />
</rule>
<rule name="login">
<match url="^apptest" />
<action type="Redirect" url="testing.app.com/apptest/login" appendQueryString="false" />
</rule>
</rules>
</rewrite> 发布于 2020-07-30 09:30:15
您可以尝试以下规则:
<rule name="test5" stopProcessing="true">
<match url="(.*)" />
<conditions>
<add input="{HTTP_HOST}" pattern="testing.app.com" />
<add input="{REQUEST_URI}" pattern="^/apptest$" />
</conditions>
<action type="Redirect" url="https://www.google.com/" appendQueryString="false" />
</rule>https://stackoverflow.com/questions/63165754
复制相似问题