简体   繁体   English

Intelligencia.UrlRewriter中的URLParameter值错误

[英]URLParameter value bug in Intelligencia.UrlRewriter

my rewrite rule is 我的重写规则是

**<rewriter> ** <重写者>

<rewrite url="~/categories/([0-9,AZ,az,-]+)/(.+).aspx" to="~/inventory/product-list.aspx?categorycode=$1" processing="stop"/> <将url =“〜/ categories /([0-9,AZ,az,-] +)/(。+)。aspx”改成=“〜/ inventory / product-list.aspx?categorycode = $ 1”处理= “停止” />

</rewriter>** </ rewriter> **

it works for url with 它适用于

/category/abc/abc.aspx /category/abc/abc.aspx

but causes problem with 但导致问题

/category/con/abc.aspx /category/con/abc.aspx

i dont understand why? 我不明白为什么?

if we pass " con " as url parameter value in any site used by Intelligencia.UrlRewriter. 如果我们在Intelligencia.UrlRewriter使用的任何站点中将“ con ”作为url参数值传递。 you may find similar problem. 您可能会发现类似的问题。

Have researched so much and found an answer. 研究了很多,找到了答案。

Actually IIS restricts us from use certain keywords in URL like IIS实际上限制了我们在URL中使用某些关键字,例如

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

but we can solve this by using following settings in web.config file. 但是我们可以通过在web.config文件中使用以下设置来解决此问题。

<configuration> <配置>
<system.web> <system.web>
<httpRuntime relaxedUrlToFileSystemMapping="true"/> <httpRuntime RelaxedUrlToFileSystemMapping =“ true” />
</system.web> </system.web>
</configuration> </ configuration>

It solved my problem. 它解决了我的问题。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM