打开网址:http://xxxx.com自动跳转==》http://xxx.com/home/index

设置route入口:

routes.MapRoute(
    name: "Main",
    url: "",
    defaults: new { controller = "Home", action = "Main", id = UrlParameter.Optional }
);

添加Main

public ActionResult Main()
{
    return Redirect("/Home/Index");
}

 

相关文章:

  • 2022-12-23
  • 2022-12-23
  • 2021-07-22
  • 2021-04-17
  • 2021-10-04
  • 2021-06-11
猜你喜欢
  • 2022-12-23
  • 2021-11-25
  • 2021-07-13
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
相关资源
相似解决方案