用于在asp.net Web表单中重写页面的url重写模块规则

时间:2013-02-20 19:23:52

标签: asp.net iis iis-7 web-config url-rewrite-module

我正在尝试在我正在处理的一个应用程序中使用Microsoft Url Rewrite并且用于测试目的,例如我有这个URL:http://localhost:65532/MyWebsite/Page.aspx?PID=16483这将给我我想要的页面,一切看起来都很好但是当我正在尝试使用此规则重写URL:

 <rule name="Page View" enabled="true" stopProcessing="true">
                    <match url="actor/^([a-zA-Z0-9_\-+]+)/?$" />
                    <conditions logicalGrouping="MatchAll" trackAllCaptures="false">
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="Page.aspx?N={R:1}&amp;PID={R:2}" />
                </rule>

尝试打开以下页面:

http://localhost:65532/MyWebsite/actor/bruce-willis/C-62

我收到一个错误,无法找到该页面,您认为我应该如何解决我的情况?在IIS和页面中都设置了所有内容。 在此先感谢Laziale

0 个答案:

没有答案
相关问题