Relative links are broken due to context path defined as forward slash
Platform Notice: Data Center Only - This article only applies to Atlassian products on the Data Center platform.
Note that this KB was created for the Data Center version of the product. Data Center KBs for non-Data-Center-specific features may also work for Server versions of the product, however they have not been tested. Support for Server* products ended on February 15th 2024. If you are running a Server product, you can visit the Atlassian Server end of support announcement to review your migration options.
*Except Fisheye and Crucible
Problem
Relative links do not work as described in the Confluence link syntax. Seeing the following URL pattern when hover to the "edit" tab in a page:
1
[http://pages/editpage.action?pageId=]<the pageID>
Note that the <domainURL> is missing compare to the valid/actual URL:
1
http://<domainURL>/pages/editpage.action?pageId=<the pageID>
Cause
The context path is specified in an invalid format. To access Confluence instance without any context path, the following configuration is used in the server.xml
or confluence.xml
for a .war file:
1
<Context path="" docBase="../confluence" debug="0" reloadable="false">
Adding a slash to the context path will cause this incorrect link behaviour:
1
<Context path="/" docBase="../confluence" debug="0" reloadable="false">
Solution
Remove the additional slash defined in the server.xml file:
1
<Context path="" docBase="../confluence" debug="0" reloadable="false">
Was this helpful?