12345678910111213141516171819202122232425262728293031323334353637383940414243444546 |
- using System;
- using System.Web;
- namespace URLRewriter
- {
-
-
-
-
- public abstract class BaseModuleRewriter : IHttpModule
- {
-
-
-
-
-
-
- public virtual void Init(HttpApplication app)
- {
-
-
- app.AuthorizeRequest += new EventHandler(this.BaseModuleRewriter_AuthorizeRequest);
- }
- public virtual void Dispose() {}
-
-
-
-
-
- protected virtual void BaseModuleRewriter_AuthorizeRequest(object sender, EventArgs e)
- {
- HttpApplication app = (HttpApplication) sender;
- Rewrite(app.Request.Path, app);
- }
-
-
-
-
-
-
- protected abstract void Rewrite(string requestedPath, HttpApplication app);
- }
- }
|