AI OnAI Off
Hi,
You can do something like this:
public static string RewriteUrlsToFriendly(this string input, PageData page)
{
UrlBuilder internalUrl = new UrlBuilder(page.LinkURL);
UrlBuilder externalUrl = new UrlBuilder(page.LinkURL);
HtmlRewriteToExternal rewriter = EPiServer.Global.UrlRewriteProvider.GetHtmlRewriter();
EPiServer.Global.UrlRewriteProvider.ConvertToExternal(externalUrl, page.PageLink, UTF8Encoding.UTF8);
return rewriter.RewriteString(internalUrl, externalUrl, UTF8Encoding.UTF8, input);
}
You can also see this article http://world.episerver.com/Blogs/Deane-Barker/Dates/2010/9/Correcting-All-Raw-URLs-Inside-a-String-of-HTML/
The link format in a normal page export is in permanent link format: i.e. ~/link/f9ef91b787af4ec393c2d63aef3161fc.aspx
But is it possible to make sure that external links are outputted when doing Page Export?