Vulnerability in EPiServer.Forms

Try our conversational search powered by Generative AI!

External links in CMS converting to internal


Hi. We recently upgraded our version of CMS (currently on 11.8) and now all of our links added via CMS have changed to use "internal links" vs. "external". We have a custom url structure that uses the 'simple url' to create a flat site structure, eg. . However with the CMS changes, all of our links are either the Episerver content ids, eg. /link/content-id-here.aspx or paths /episerver/path/to/file.

Looking at Epi's documentation, it seems that this behavior is by design. The documentation suggests that even if you specify the link as "external", Epi will auto convert it to an "internal".

My question is what would be considered "best practice" for overriding this default behavior? Is there built-in functionality to disable this feature or make any link marked as "external" skip over this logic? 

Would custom code be required?

Thanks for your time.

Jul 06, 2018 20:53

Links are stored in an internal format within EPiServer. The normal is to convert them to an external/FURL (Friendly URL) during rendering. For MVC sites this is typically done either through usage of @html.PropertyFor (or through other html helpers like @html.ContentLink() or @html.XhtmlString()). To get outgoing urls in simple adress format you could hook up an event handler to IContentRouteEvents.CreatedVirtualPath and in the event handler rewrite the path to the simple address.

Like a answer a bit down in thread (it's abit old but the concept still applies)

Jul 11, 2018 13:49

Can you not use "Simple address" functionality provided by episerver to make things simple and your life easy?

Jul 11, 2018 15:17
* 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.