1。该操作在Application_BeginRequest 中完成;
String path = Request.FilePath.ToString(); ///获取当前请求的虚拟路径
if (Regex.IsMatch(path, "/ChargeInfo/(.+).html", //匹配
RegexOptions.IgnoreCase))
{
String idString =
path.Substring(path.LastIndexOf('/') + 1, //截取参数
path.Length - path.LastIndexOf('/') - 6);
Context.RewritePath("~/Show/DisShopShow/OfferDetail?Id=" +idString); //跳转控制器
}
153559552 mvc3 mvc4交流群