Iis 不带扩展名的文件夹/页面名称的重写规则

Iis 不带扩展名的文件夹/页面名称的重写规则,iis,url-rewriting,Iis,Url Rewriting,我有一个重写规则,它似乎不像我预期的那样有效。我被重定向到404。似乎只有在页面上有分机时才有效 /folder/page.html起作用,但/folder/page不起作用 <rule name="preact" stopProcessing="true"> <match url=".*" /> <conditions logicalGrouping="MatchAll"> <add input="{RE

我有一个重写规则,它似乎不像我预期的那样有效。我被重定向到404。似乎只有在页面上有分机时才有效

/folder/page.html起作用
,但
/folder/page不起作用

<rule name="preact" stopProcessing="true">
    <match url=".*" />
        <conditions logicalGrouping="MatchAll">
            <add input="{REQUEST_FILENAME}" matchType="IsFile" negate="true" />
            <add input="{REQUEST_FILENAME}" matchType="IsDirectory" negate="true" />
            <add input="{REQUEST_URI}" pattern="^/(docs)" negate="true" />
        </conditions>
    <action type="Rewrite" url="index.html" />
</rule>

Read FRT该规则适用于非asp.net应用程序。您应该查看失败的请求跟踪日志,检查无扩展处理程序是否阻止重写并返回404错误。请确保asp.net管道已忽略路由