protected void Application_BeginRequest(object sender, EventArgs e)
{
    string url = Request.RawUrl.ToString();
    if (url.ToLower().IndexOf("page/bloglist/"> -1 && url.IndexOf("?"< 0)
    {
        int lastg = url.LastIndexOf("/");
        int lastdot = url.LastIndexOf(".aspx");
        string nurl = String.Format("{0}/blog.aspx?sid={1}", url.Substring(0, lastg), url.Substring(lastg + 1, lastdot - lastg - 1));
        HttpContext.Current.RewritePath(nurl);
    }
}

相关文章:

猜你喜欢
相关资源
相似解决方案