Try our conversational search powered by Generative AI!

External links in CMS converting to internal

Vote:
 

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. http://www.site.whatever/simple-id.html . 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". 

http://webhelp.episerver.com/latest/cms-edit/adding-links.htm#internallink

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.

#194907
Jul 06, 2018 20:53
Vote:
 

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 https://world.episerver.com/forum/developer-forum/-Episerver-75-CMS/Thread-Container/2014/10/URL-Rewrite-provider-issue/ (it's abit old but the concept still applies)

#195029
Jul 11, 2018 13:49
Vote:
 

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

#195034
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.