【发布时间】:2016-02-05 00:09:51
【问题描述】:
我有 Angular URL,例如 "www.mycompany.com/employee/{78}" 。 我想重写这个 url,就好像我点击这个员工并尝试在新标签中打开它,它使用基本 url 即“www.mycompany.com/index.html/employee/78”。
<rule name="main rule 2" stopProcessing="true">
<match url="^index.html/employee/[0-9]+$" />
<action type="Redirect" url="/employee/{78}" appendQueryString="true" />
</rule>
我的问题是如何使用查询字符串?即在这种情况下,重写 URL 时的员工 ID。现在我已经输入了常数 78,但我想引用“[0-9]+$”这个值的任何常数。
【问题讨论】: