0

my rewrite rule is

**<rewriter>

<rewrite url="~/categories/([0-9,A-Z,a-z,-]+)/(.+).aspx" to="~/inventory/product-list.aspx?categorycode=$1" processing="stop"/>

</rewriter>**

it works for url with

/category/abc/abc.aspx

but causes problem with

/category/con/abc.aspx

i dont understand why?

if we pass "con" as url parameter value in any site used by Intelligencia.UrlRewriter. you may find similar problem.

4

1 回答 1

0

研究了这么多,找到了答案。

实际上 IIS 限制我们在 URL 中使用某些关键字,例如

COM1-9、LPT1-9、AUX、PRT、NUL、CON

但是我们可以通过在web.config文件中使用以下设置来解决这个问题。

<configuration>
     <system.web>
         <httpRuntime RelaxUrlToFileSystemMapping="true"/>
    </system.web>
</configuration>

它解决了我的问题。

于 2012-10-16T14:30:45.793 回答