[opencms-dev] Absolute links to different webapps in same server as site root gets changed to relative links

Nacho Fernández jifernandez at ugr.es
Wed Jul 22 12:41:00 CEST 2026


Hi again. Thank you so much for the hint! Even not being the ideal way 
to tackle the issue (specially when the apps deployed vary a lot), it 
actually works nicelly. It is important to notice that the file 
/system/config/linkexcludes can be edited from the OpenCms workplace, 
but it requires changing the file opencms-importexport.xml, switching 
the <linksustitutionhandler> content from class 
org.opencms.staticexport.CmsDefaultLinkSubstitutionHandler to class 
org.opencms.staticexport.CmsAdvancedLinkSubstitutionHandler.

If someone else knows of a way of configuring this behaviour in a more 
general way it would be great to know about it.

El 21/07/2026 a las 13:44, Pavel Rath via opencms-dev escribió:
> Hello,
>
> we have OpenCms running as root webapp, but we also have another web applications on same server. To avoid marking links to other webapps as broken links, we have them listed in /system/config/linkexcludes (listed items as "/webapp1", "/webapp2" etc.). This might also help to your problem.
>
> Best regards,
> Pavel Rath
>
> -----Original Message-----
> From: opencms-dev<opencms-dev-bounces at opencms.org> On Behalf Of Nacho Fernández via opencms-dev
> Sent: Tuesday, July 21, 2026 1:35 PM
> To:opencms-dev at opencms.org
> Cc: Nacho Fernández<jifernandez at ugr.es>
> Subject: [opencms-dev] Absolute links to different webapps in same server as site root gets changed to relative links
>
> Hi all,
>
> Haven't found a solution looking up similar problems in the mailing list
> archive, so I'll try to shout out my problem:
>
> I have an OpenCms installation residing in a web server (let's call it
> https://myserver) with OpenCms itselft not as root webapp but deployed
> as /portal
>
> The urlhttps://myserver it set as "site root". Whenever I try to create
> an absolute link to a different webapp inside my server, which I need to
> do quite often, be it with the inline editor or directly editting the
> control code, OpenCms changes it automatically to a relative link
> pointing insidehttps://myserver/portal, ruining the link in the
> process. For instance, if my webapp is called "mywebapp" and I want an
> absolute linkhttps://myserver/mywebapp/whatever it gets changed inside
> the control code to a relative link to /sites/default/mywebapp/whatever
> which translates when I want to click it
> intohttps://myserver/portal/mywebapp/whatever
>
> Is there anyway to configure out this annoying behaviour? Can I just
> simply not list my actual server as the "site root", as I assume it is
> what OpenCms is using, without breaking anything important such as
> access to the workplace or static export? I already tried listing the
> site root as"http://myserver" (the not secure alternative) and it keeps
> behaving exactly the same.
>
> I would be REALLY grateful if I could get some hints from anyone. Thank
> you in advance,
>
> Nacho Fdez.
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
>
> _______________________________________________
> This mail is sent to you from the opencms-dev mailing list
> To change your list options, or to unsubscribe from the list, please visit
> https://lists.opencms.org/mailman/listinfo/opencms-dev
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20260722/cb1be4d9/attachment.htm>


More information about the opencms-dev mailing list