.net伪静态网址添加.html结尾
程序员文章站
2024-02-12 12:41:22
...
web.config
<handlers>
<add name="htmlHandler" verb="GET,HEAD" path="*.html" type="System.Web.StaticFileHandler"/>
</handlers>
RouteConfig.cs
routes.MapRoute(
name: "Default",
url: "{controller}/{action}.html"
);