【发布时间】:2011-11-10 09:45:22
【问题描述】:
我之前问过这个问题,我觉得很糟糕 - 所以简而言之......
我有一个中国和澳大利亚的网站
第一次重定向很好
http://mycompany.com/myproduct --> http://mycompany.com/products/myproduct
我也需要这个
http://mycompany.com/cn/myproduct --> http://mycompany.com/cn/products/myproduct
这个表达式匹配第一个和第二个 ^(cn|com)/myproduct/?
问题是——在action面板下,满足两者的Redirect Url格式是什么?
类似的东西 重定向网址:{R:0}/products/myproduct(这不起作用..仅用于说明)
干杯!
编辑:
如果这有帮助 - 这是我在 web.config 中遇到问题的规则
<rule name="myproduct" stopProcessing="true">
<match url="^(cn|com)/myproduct/?" />
<conditions logicalGrouping="MatchAny" trackAllCaptures="true">
</conditions>
<action type="Redirect" url="{R:1}/products/myproduct" />
</rule>
【问题讨论】: