使用iis7重写模块重写与符号url



如何在web上的url重写规则中使用&符号(&)。配置文件?

我想重写url:
http://www.foo.com/index.asp?SomeParameter=SomeValue&SomeId=00

:

http://www.foo.com/Section/Page

我在web.config中写了下面的规则:

    <rule name="RuleName" stopProcessing="true">
      <match url="^index.asp?SomeParameter=SomeValue&SomeId=00" ignoreCase="true" />
      <action type="Redirect" url="Section/Page"  appendQueryString="false" />
    </rule>

但是我在输入url中遇到了与符号(&)的问题。当尝试重写I Get:

请求的页面不能被访问,因为相关的页面的配置数据无效。

我试图解析与符号到%26,但我得到同样的错误。

尝试使用HTML &字符代码&amp;

最新更新