AI OnAI Off
This is the way I use to make the links to work in an external rss reader.
UrlBuilder url = new UrlBuilder(page.LinkURL);
EPiServer.Global.UrlRewriteProvider.ConvertToExternal(url, page.PageLink, System.Text.UTF8Encoding.UTF8);
EPiServer.Global.UrlRewriteProvider.GetHtmlRewriter().RewriteString(new UrlBuilder(page.LinkURL), url, System.Text.UTF8Encoding.UTF8, your_string_here);
I also do some Regex.Replace inserting SiteUrl before I use the code above.
I'm having a bit of trouble with an RSS flow on a page that I am developing. In the message text there is some links like this http://{sitename}.se/t/page.aspx?id=59 . When I have a string only containing the link there isn't any trouble to convert it with the following method:
UrlBuilder url = new UrlBuilder(page.LinkURL);
EPiServer.Global.UrlRewriteProvider.ConvertToExternal(url, page.PageLink, System.Text.UTF8Encoding.UTF8);
But now the links are inside an xhtlm string. I have seen some posts that recommend using GetHtmlRewriter. I can't figure how to use it; can someone post any tips or examples?