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表達