Wiki source code of URL Configuration Properties

Last modified by Eleni Cojocariu on 2026/11/16 18:40

Hide last authors
Eleni Cojocariu 10.3 1 The configuration keys that decide which URLs XWiki accepts and which URLs it generates. The How-tos under [[Short URLs>>doc:documentation.xs.admin.urls.short-urls.WebHome]] are what set them.
Eleni Cojocariu 2.1 2
Eleni Cojocariu 7.1 3 Two files are involved, and they do not do the same thing. The ##xwiki.cfg## keys are what XWiki's URL factory reads when it **generates** a URL. The ##url.standard.*## keys of ##xwiki.properties## act on the way an incoming URL is **read**, when they are read at all, so none of them changes the URLs the wiki puts in its pages.
Eleni Cojocariu 2.1 4
Eleni Cojocariu 9.1 5 The comments shipped in the configuration file itself say otherwise, presenting two of these keys as replacements for their older counterparts, and a third key is read under the name of another. Both defects are tracked as [[XWIKI-25636>>https://jira.xwiki.org/browse/XWIKI-25636]].
Eleni Cojocariu 8.1 6
Eleni Cojocariu 2.1 7 |=Property|=File|=Default|=What it does
8 |##xwiki.webapppath##|##xwiki.cfg##|taken from the request URL|The application name used in generated URLs. An empty value removes it.
9 |##xwiki.servletpath##|##xwiki.cfg##|taken from the request URL|A hard override of the servlet mapping in generated URLs, written with a trailing slash and no leading one. A short-URL setup uses ##xwiki.defaultservletpath## instead.
10 |##xwiki.defaultservletpath##|##xwiki.cfg##|##bin/##|The fallback servlet mapping, used when it cannot be determined from the request URL, which is the case behind a reverse proxy. An empty value drops ##bin## from generated URLs.
Eleni Cojocariu 9.1 11 |##url.standard.entityPathPrefix##|##xwiki.properties##|##bin##|Nothing reads this key, so setting it changes no URL at all. The prefix XWiki recognises as introducing an entity path is taken from ##url.standard.multiwiki.wikiPathPrefix## instead, falling back to ##xwiki.defaultservletpath##, which is why the default still works.
Eleni Cojocariu 2.1 12 |##xwiki.showviewaction##|##xwiki.cfg##|##1##|Whether the ##view## action appears in generated URLs. Set it to ##0## to omit it.
Eleni Cojocariu 5.1 13 |##url.standard.hideViewAction##|##xwiki.properties##|##false##|Declared in ##xwiki.properties## as the replacement for ##xwiki.showviewaction##, but no code reads its value, so setting it has no effect.
Eleni Cojocariu 9.1 14 |##url.standard.multiwiki.wikiPathPrefix##|##xwiki.properties##|##wiki##|The path segment that precedes the name of a path-based subwiki in the URLs XWiki accepts. Changing it means changing the matching ##action## servlet mapping in ##web.xml## too, and the page URLs XWiki generates keep ##wiki/## whatever its value. It also sets the entity path prefix that the key above is named for, so giving it any other value stops ##bin## from being recognised and every page URL answers 404.

Get Connected