메소드 | 설명 | |
---|---|---|
OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void |
Determines whether the HTTP request contains a non-canonical URL using TryGetCanonicalUrl, if it doesn't calls the HandleNonCanonicalRequest method.
|
|
RedirectToCanonicalUrlAttribute ( bool appendTrailingSlash, bool lowercaseUrls ) : System |
Initializes a new instance of the RedirectToCanonicalUrlAttribute class.
|
메소드 | 설명 | |
---|---|---|
HandleNonCanonicalRequest ( System.Web.Mvc.AuthorizationContext filterContext, string canonicalUrl ) : void |
Handles HTTP requests for URL's that are not canonical. Performs a 301 Permanent Redirect to the canonical URL.
|
|
HasNoTrailingSlashAttribute ( System.Web.Mvc.AuthorizationContext filterContext ) : bool |
Determines whether the specified action or its controller has the NoTrailingSlashAttribute attribute specified.
|
|
TryGetCanonicalUrl ( System.Web.Mvc.AuthorizationContext filterContext, string &canonicalUrl ) : bool |
Determines whether the specified URl is canonical and if it is not, outputs the canonical URL.
|
protected HandleNonCanonicalRequest ( System.Web.Mvc.AuthorizationContext filterContext, string canonicalUrl ) : void | ||
filterContext | System.Web.Mvc.AuthorizationContext | An object that encapsulates information that is required in order to use the
/// |
canonicalUrl | string | The canonical URL. |
리턴 | void |
protected HasNoTrailingSlashAttribute ( System.Web.Mvc.AuthorizationContext filterContext ) : bool | ||
filterContext | System.Web.Mvc.AuthorizationContext | The filter context. |
리턴 | bool |
public OnAuthorization ( System.Web.Mvc.AuthorizationContext filterContext ) : void | ||
filterContext | System.Web.Mvc.AuthorizationContext | An object that encapsulates information that is required in order to use the
/// |
리턴 | void |
public RedirectToCanonicalUrlAttribute ( bool appendTrailingSlash, bool lowercaseUrls ) : System | ||
appendTrailingSlash | bool | If set to |
lowercaseUrls | bool | If set to |
리턴 | System |
protected TryGetCanonicalUrl ( System.Web.Mvc.AuthorizationContext filterContext, string &canonicalUrl ) : bool | ||
filterContext | System.Web.Mvc.AuthorizationContext | An object that encapsulates information that is required in order to use the
/// |
canonicalUrl | string | The canonical URL. |
리턴 | bool |