在Global.asax文件中添加

protected void Application_BeginRequest(Object sender, EventArgs e)
        {
            if (Context.Request.FilePath == "/") Context.RewritePath("index.html");
        }


在访问www.test.com时有index.html就是index.html,没有时就自动路由规则去了

相关文章:

  • 2022-01-12
  • 2021-11-07
  • 2021-11-29
  • 2021-07-29
  • 2021-05-07
  • 2022-01-20
  • 2021-03-31
猜你喜欢
  • 2022-12-23
  • 2022-12-23
  • 2021-11-30
  • 2021-05-19
  • 2022-01-09
  • 2021-11-14
相关资源
相似解决方案