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?
不得不删除领先的斜杠,它的工作。
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.