Advertisement

Asp.net技术开发支持URL重定向功能

阅读量:

概述

方法

复制代码
复制代码
     1class MyUrlWriter : IHttpModule
     2      {
     3publicvoid Init( HttpApplication context)
     4            {
     5new EventHandler (context_BeginRequest);
     6            }
     7 8protectedvoidobject sender, EventArgs e)
     9            {
    10as HttpApplication ;
    11//上下文12string//获得请求URL1314new"/Article/[A-Z0-9a-z_]+"//定义规则15if (articleRegex.IsMatch(url))
    16                  {
    17strin

全部评论 (0)

还没有任何评论哟~