一般主机空间都支持脚本映射,在空间里做一个 *.html映射到NET4,然后web.config里添加规则,见下文
<system.webServer>
<rewrite>
<rules>
<rule name="r1">
<match url="default.html" />
<action type="Rewrite" url="Default.aspx" />
</rule>
<rule name="r10">
<match url="newsdetail-([0-9]*)-([0-9]*).html" />
<action type="Rewrite" url="newsdetail.aspx?oid={R:1}&sClass={R:2}" />
</rule>
</rules>
</rewrite>
</system.webServer>