这是我在 web.config 中设置的规则:
<rule name="RedirectPopups" stopProcessing="true">
<match url="^webforms/visitor/popup/*" />
<conditions>
<add input="{REQUEST_METHOD}" pattern="^POST$" negate="true" />
<add input="{QUERY_STRING}" pattern="^([^=&]+)=([^=&]+)$" />
</conditions>
<action type="Redirect" url="jwelery/INEEDTHEPAGEVARIABLEHERE/{C:1}/{C:2}" appendQueryString="false" redirectType="Permanent" />
</rule>
基本上我在 webforms\visitor\popup 中有我的弹出窗口。我想写一个规则,当在这个弹出目录中请求任何页面时。它被重定向到一些自定义 url。
例如。
如果用户请求webforms/visitor/popup/HelloWorld.aspx?a=1
他应该被重定向到jwelery/HelloWorld/a/1
我只需要在重定向操作中的“INEEDTHEPAGEVARIABLEHERE”中写什么的解决方案。我可以使用任何特殊变量吗?我正在使用 IIS7
谢谢。