Provide basic URL rewrite functionality, mapping to and from an internal format. The mapping performed is context-free in the sense that it just maps from internal or to internal, it does not rebase relative URLs dependning on the internal and external requesting context URL.

Namespace:  EPiServer.Web
Assembly:  EPiServer (in EPiServer.dll) Version: 6.0.530.0

Syntax

C#
public abstract class UrlRewriteProvider : ProviderBase

Examples

Get a friendly URL for the given PageData object. Returns the friendly Url for the given PageData object.

CopyC#
public static string AbsoluteExternalUrl(PageData pageDataObject)
{
    UrlBuilder relativeUrl = new UrlBuilder(pageDataObject.LinkURL);
    Global.UrlRewriteProvider.ConvertToExternal(relativeUrl, pageDataObject.PageLink, UTF8Encoding.UTF8);

    return EPiServer.Configuration.Settings.Instance.SiteUrl.ToString() + relativeUrl.ToString().TrimStart('/');
}

Inheritance Hierarchy

See Also