应该需要在IIS中添加对html的映射才能重写.
在网站的web.config配置一下看看.<system.webServer>
<handlers>
<add name="html伪静态" path="*.html" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
</handlers>
</system.webServer>
在网站的web.config配置一下看看.<system.webServer>
<handlers>
<add name="html伪静态" path="*.html" verb="GET,HEAD,POST,DEBUG" modules="IsapiModule" scriptProcessor="%windir%\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll" resourceType="Unspecified" preCondition="classicMode,runtimeVersionv2.0,bitness32" />
</handlers>
</system.webServer>
在IIS网站的“属性”中,找到主目录,在“应用程序设置”中,点击“配置”-“插入”-“浏览”,选择“WINDOWS\Microsoft.NET\Framework\v2.0.50727\aspnet_isapi.dll”,并且把“确认文件是否存在”的勾去掉,“确定”就行了。
<handlers>
<add name="html-4.0" path="*.html" verb="*" type="System.Web.UI.PageHandlerFactory" resourceType="Unspecified" requireAccess="Script" preCondition="integratedMode" />
</handlers>
</system.webServer>