在Windows 7上的IIS7中使用URL重写模块404

时间:2010-01-15 17:53:30

标签: iis-7 url-rewriting

我正在尝试通过IIS7上的“使用 URL重写模块”重写URL(Windows 7)。

网址: http://localhost/AIM/group-discussion/videos.aspx?id=4&title=some-title

重写网址:http://localhost/AIM/group-discussion/videos/4/some-title

重写规则:

<rewrite>
            <rules>
                <rule name="RewriteUserFriendlyURL1" stopProcessing="true">
                    <match url="^AIM/group-discussion/videos/([^/]+)/([^/]+)/?$" />
                    <conditions>
                        <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
                        <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
                    </conditions>
                    <action type="Rewrite" url="AIM/group-discussion/videos.aspx?id={R:1}&amp;title={R:2}" />
                </rule>
            </rules>
        </rewrite>

我在访问重写网址(http://localhost/AIM/group-discussion/videos/4/some-title

时收到404错误

在IIS7

中通过“失败的请求跟踪”进行错误登录
MODULE_SET_RESPONSE_ERROR_STATUS

ModuleName="IIS Web Core", Notification="MAP_REQUEST_HANDLER", HttpStatus="404", HttpReason="Not Found", HttpSubStatus="0", ErrorCode="The system cannot find the file specified.
 (0x80070002)", ConfigExceptionInfo=""

我正在“集成管道模式”

中运行网站

0 个答案:

没有答案