In ASP.Net the IHttpModule interface exposes the following method:
public void Init(System.Web.HttpApplication context)
The HttpApplication object contains the current execution context which includes the Request, Response, Session and Server objects.
You can gain access to the same object anywhere in your ASP.Net code by using the following:
System.Web.HttpContext.Current
You can access the value you're looking for like this:
string t = context.Request.QueryString["t"];
You can then do the redirect in this way:
string t = context.Request.QueryString["t"];
if(t == null)
context.Response.Redirect(context.Requset.Url.ToString() + "?t=value";
This is a very basic implementation if you're expecting other query string values you may need more complicated rules.
IHttpHandler and IHttpModule are used for defining custom Handlers and custom Modules. These are code libraries which are generally designed to be reusable simply by registering them in IIS. So they essentially modify behaviour without modifying the website code.
If this is a one off process for a single application you may be better off using your Global.asax file. You can add the following method:
protected void Application_BeginRequest(object sender, EventArgs e)
This will then be called every time your application receives a request. Although you must be careful as with all these methods requests for images and js files e.t.c. will also cause the code to be executed.