Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Join us this Friday for AI in Action at the Virtual Happy Hour! This free virtual event is open to all—enroll now on Academy and don’t miss out.
Hello,
I think you should be able to use your FriendlyUrlRewriteProvider. With that you can use the ConvertToInternal / ConvertToExternal (The default provider is in the EPiServer.Web namespace)
FriendlyUrlRewriteProvider provider = new FriendlyUrlRewriteProvider();
provider.ConvertToInternal(new UrlBuilder(theUrl));
or
provider.ConvertToExternal(...);
Warning though.. I haven't used these myself so I might be way off. But looks like that is the way. Mayeb I have time to look at it mor later if im wrong.
Thanks, Johan, but I don't really want to feed it individual links. I'd rather give it a big string and have it find the links and correct them all, like it must do at some point in the page lifecycle.
I know there is some process which rewrites all the HREFs in content to the friendly URL. So, at some point in the page lifecycle, internal links go from...
/Templates/Public/Page.aspx?id=163&epslanguage=en
to...
/my/friendly/url
Where does this process happen, and can it be forced? I have some content that (for a very odd, but domain-specific reason) I am generating as a string in in a handler (.ashx). So, this content is not going through this "filter," and the links aren't being converted.
Is there some way to force this link conversion? On a raw string, preferably?