Try our conversational search powered by Generative AI!




I'm hoping this is a quick and easy one, I just haven't been able to find the answer (yet!).

I need to write a meta data tag to a page with the full URL of the page e.g. and found some code to do this as follows:

    /// Get the pages external URL
    /// <param name="page">
    /// The pages external URL
    public static string GetExternalUrl(this PageData page)
        string result = string.Empty;
        if (page.PageLink != null && page.PageLink.ID > 0)
            var url = new UrlBuilder(HttpContext.Current.Request.Url.GetLeftPart(UriPartial.Authority) +  HttpContext.Current.Request.ApplicationPath.TrimEnd('/') + page.LinkURL);
            if (UrlRewriteProvider.IsFurlEnabled)
                Global.UrlRewriteProvider.ConvertToExternal(url, null, Encoding.UTF8);
                result = url.ToString();
                result = url.ToString();
        return result;


Now on my dev site this works well and produces the full URL that I need however on my production site this produces the URL in the internal format e.g.;epslanguage=en-GB

From the code I would guess that it's not getting into the condition IsFurlEnabled so is not converting it to an external URL. If this guess is correct then this leads me to the fact that Friendly URLs are not enabled in my production site but are in my dev site.

Based on this I've tried to determine how to enable this on production but as far as I can tell all the configuration is set up correctly and as I would expect compared to my dev environment.

Am I correct with this or am I missing something more obvious?

Thanks in advance,


Apr 19, 2012 10:26

Does the url look friendly on your production site? Is the friendly URL rewriter the default URL rewriter provider in episerver.config?

Apr 19, 2012 11:32

Hi Toni,

The URL of the page in the address bar on the production site is friendly e.g. but the meta data item in the source of the same page is not.

The defaultProvider for the for the urlRewrite section in episerver.config is a custom provider but this is the same in both production and dev (it works in dev).


Apr 19, 2012 14:33

Ok, then it shouldn't be your custom provider. But can you just for the sake of it switch it to friendly to see if it makes any difference?

Apr 19, 2012 14:43

Using the EPiServerFriendlyUrlRewriteProvider makes no difference and it still displays the friendly address in the browser address bar and non friendly address in the source meta data...

Apr 19, 2012 15:07
This thread is locked and should be used for reference only. Please use the Episerver CMS 7 and earlier versions forum to open new discussions.
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.