部署了一个网站,需要设置网站的首页为后台登录页面
在Global.asax文件中增加
protected void Application_BeginRequest(object sender, EventArgs e)
{
if(Context.Request.FilePath == "/")
Context.RewritePath("Admin/Login/Test");
}
设置ASP.NET MVC站点默认页为指定页面
阅读 71
2022-07-27
部署了一个网站,需要设置网站的首页为后台登录页面
在Global.asax文件中增加
protected void Application_BeginRequest(object sender, EventArgs e)
{
if(Context.Request.FilePath == "/")
Context.RewritePath("Admin/Login/Test");
}
相关推荐
精彩评论(0)