C# Class Canonicalize.RedirectHandler

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

Méthodes publiques

Méthode 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 méthode

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

ProcessRequest() public méthode

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.
Résultat void

RedirectHandler() public méthode

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.
Résultat System