0

I have just started using IIS7 and am setting up various URL rewrites. I am new to this so I may be making a novice mistake.

I am trying to rewrite a postcode so that I can have /KA71DR rewrite to /gis/property.asp?postcode=KA71DR

I have the following but it's not working:

<rule name="Postcode">
<match url="^/[a-zA-Z]{1,2}[0-9][0-9A-Za-z]{0,1} {0,1}[0-9][A-Za-z]{2}$" />
<action type="Rewrite" url="/gis/Property.aspx?postcode={R:0}" />
</rule>

The Test Pattern works. But when I try the page it returns a 404. Can anyone suggest what I am doing wrong?

4

1 回答 1

0

必须删除前导斜杠并且它起作用了。

于 2011-02-21T08:31:43.863 回答