IIS中的Url Rewrite获得404 [英] Url Rewrite in IIS get 404
本文介绍了IIS中的Url Rewrite获得404的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
<rule name="List_of_mfrs" enabled="true">
<match url="/Manufacturers_(\w)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="/list_of_mfrs/mfrs.cfm?ot={R:1}" />
</rule>
当我输入: http://MyLocalHost/list_of_mfrs/mfrs.cfm ?ot = R
收到404错误。为什么?
When I enter: http://MyLocalHost/list_of_mfrs/mfrs.cfm?ot=R
It gets 404 error. Why?
推荐答案
我知道它发生的原因:因为字符 /
在 @type
和 @url
I got why it happened: because of the character /
in @type
and @url
这是正确的文字:
<rule name="List_of_mfrs" enabled="true">
<match url="Manufacturers_(\w)" ignoreCase="false" />
<conditions logicalGrouping="MatchAll" trackAllCaptures="false" />
<action type="Rewrite" url="list_of_mfrs/mfrs.cfm?ot={R:1}" />
</rule>
这篇关于IIS中的Url Rewrite获得404的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文