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

Pavel Rath pavel.rath at vsb.cz
Tue Jul 21 13:44:10 CEST 2026


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 url https://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 inside https://myserver/portal, ruining the link in the 
process. For instance, if my webapp is called "mywebapp" and I want an 
absolute link https://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 
into https://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



-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 5573 bytes
Desc: not available
URL: <http://lists.opencms.org/pipermail/opencms-dev/attachments/20260721/ef030221/attachment.bin>


More information about the opencms-dev mailing list