C# Class Canonicalize.RedirectHandler

Implements IRouteHandler and IHttpHandler to send a permanent redirect (HTTP status code 301).
Inheritance: IRouteHandler, IHttpHandler
Show file Open project: schourode/canonicalize Class Usage Examples

Public Methods

Method Description
GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler

Provides the object that processes the request.

ProcessRequest ( HttpContext context ) : void

Redirects a HTTP request by setting the status code and the Location header.

RedirectHandler ( Uri location ) : System

Initializes a RedirectHandler with a provided redurict URL.

Method Details

GetHttpHandler() public method

Provides the object that processes the request.
public GetHttpHandler ( System.Web.Routing.RequestContext requestContext ) : IHttpHandler
requestContext System.Web.Routing.RequestContext
return IHttpHandler

ProcessRequest() public method

Redirects a HTTP request by setting the status code and the Location header.
public ProcessRequest ( HttpContext context ) : void
context System.Web.HttpContext An object that provides references to the intrinsic server objects (for example, Request, Response, Session, and Server) used to service HTTP requests.
return void

RedirectHandler() public method

Initializes a RedirectHandler with a provided redurict URL.
public RedirectHandler ( Uri location ) : System
location System.Uri The URL to which the request should be redirected.
return System