【发布时间】:2011-03-23 16:05:33
【问题描述】:
嘿,我的重定向不起作用,我不明白为什么。 我的规则如下所示:
<rewrite>
<rules>
<rule name="rewrite to article" stopProcessing="false">
<match url="^showfirm.asp\?rubrik=([_0-9a-z-]+)" />
<action type="Redirect" url="esbjerg/sog/?q={R:1}&t=" redirectType="Temporary" />
</rule>
</rules>
</rewrite>
当我尝试将 url 与
匹配时http://localhost/showfirm.asp?rubrik=sometexthere
我点击了我的自定义 404 页面,而不是点击
http://localhost/esbjerg/sog/?q=sometexthere&t=
谁能帮忙?我使用带有 urlrewriter 2.0 的 IIS 7.5
Ps : 第一次做 url 重定向 :)
【问题讨论】:
-
您检查过定义规则的顺序吗?
-
您是否尝试转义“showform.asp”中的点?我在regexpal.com 中尝试了正则表达式,没有转义它与目标句子不匹配。
-
@furquan 我不确定我在哪里可以检查这个,你在想我的 web.config 吗?因为我那里只有这条规则
标签: iis url-rewriting web-config