0
我想重定向所有的URL像http://domain.com/xxx/yyyyy.html到我的ASP.NET MVC应用程序。我打开处理程序映射为我的网站,并添加以下规则:IIS 7.5和处理程序映射
在web.config中它看起来像:
<system.webServer>
<handlers>
<add name="HTML Rewriter" path="*.html" verb="*" modules="IsapiModule" scriptProcessor="C:\Windows\Microsoft.NET\Framework\v4.0.30319\aspnet_isapi.dll" resourceType="Unspecified" requireAccess="Script" preCondition="classicMode,runtimeVersionv4.0,bitness32" />
</handlers>
</system.webServer>
在asp.net MVC应用程序的途径:
routes.MapRoute(
"xxx", // Route name
"{ext}/{filename}.html", // URL with parameters
new { controller = "Mycontr", action = "Index" } // Parameter defaults
);
但是当我尝试打开这个网址时我没有找到404文件。为什么?它的工作原理本地IIS表达