public class UrlRewrite : IHttpHandler
{
#region IHttpHandler Members
public bool IsReusable
{
get { return false; }
}
public void ProcessRequest(HttpContext context)
{
string currentPath = context.Request.Url.PathAndQuery;
Regex reg = new Regex("/extend/(?<user>)([A-Za-z0-9]+).aspx(.*)");
if (reg.IsMatch(currentPath))
{
string url = reg.Replace(currentPath, "/default.aspx?user=$1");
context.RewritePath(url);
}
}
#endregion
}
执行之后的url 是什么?有么有错误