November Happy Hour will be moved to Thursday December 5th.
November Happy Hour will be moved to Thursday December 5th.
Does the url look friendly on your production site? Is the friendly URL rewriter the default URL rewriter provider in episerver.config?
Hi Toni,
The URL of the page in the address bar on the production site is friendly e.g. www.site.com/AboutUs 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).
Mark
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?
Hello,
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. http://www.site.com/AboutUs 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();
}
else
{
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. http://www.site.com/Templates/pages/page.aspx?id=1555&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,
Mark