Our monthly Virtual Happy Hour is happening this week, Fri Feb 23!

Try our conversational search powered by Generative AI!

URL parameters stripped from links after deployment



We are using Episerver DXC for one of our project. The links to navigation menu item are like : "/products/product1" but after after deployment to Episerver DXC environment links become like

 "/EPiServer/CMS/Content/products/product1,,963/?epieditmode=False". But after few minutes URL become user friendly. 

for converting EPiserver links to user friendly url we are using below code

public static XhtmlString ToExternalLinks(this XhtmlString xhtmlString)
var result = new StringBuilder();
foreach (var fragment in xhtmlString.Fragments)
var urlFragment = fragment as UrlFragment;
result.Append(urlFragment != null ? UrlResolver.Current.GetUrl(new UrlBuilder(urlFragment.InternalFormat), ContextMode.Default) : fragment.InternalFormat);

return new XhtmlString(result.ToString());

reference: http://antecknat.se/blog/2016/03/07/xhtmlstring-render-blocks-and-convert-link-to-external-without-htmlhelper/

Any reason why links after deployment not working as expected. Surprsingly after few minutes links starts working.

Thanks in advance


Nov 09, 2017 8:22
* 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.