문제

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.

도움이 되었습니까?

해결책

Have researched so much and found an answer.

Actually IIS restricts us from use certain keywords in URL like

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

but we can solve this by using following settings in web.config file.

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

It solved my problem.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top