protected void Application_BeginRequest(object sender, EventArgs e)
{
string ss = HttpContext.Current.Request.Url.AbsolutePath;
string url1 = "/index.html";
if (HttpContext.Current.Request.Url.AbsolutePath == url1)
{
HttpContext.Current.RewritePath("login.aspx");
}
//2
string url2 = "/qxsz/index.html";
if (HttpContext.Current.Request.Url.AbsolutePath == url2)
{
HttpContext.Current.RewritePath("index.aspx");
}
}
上面的代码是在global.ashx中