Wiki source code of URLs
Last modified by Eleni Cojocariu on 2026/11/16 18:36
Hide last authors
| author | version | line-number | content |
|---|---|---|---|
![]() |
1.1 | 1 | Every page of a wiki is reached through a URL, and XWiki builds those URLs from a scheme that is configuration rather than content. The default scheme spells out the web application, the servlet mapping, the action and the page: |
| 2 | |||
| 3 | {{code language="none"}} | ||
| 4 | https://example.org/xwiki/bin/view/Sandbox/WebHome | ||
| 5 | ^^^^^ ^^^ ^^^^ ^^^^^^^^^^^^^^ | ||
| 6 | | | | page reference | ||
| 7 | | | action performed on the page | ||
| 8 | | servlet mapping | ||
| 9 | context path of the web application | ||
| 10 | {{/code}} | ||
| 11 | |||
| 12 | Each of those segments can be removed or changed. [[Short URLs>>doc:documentation.xs.admin.urls.short-urls.WebHome]] covers dropping the context path and the servlet mapping so that the address above becomes ##https:~/~/example.org/Sandbox/WebHome##, with one page per way of doing it: the bundled UrlRewriteFilter, Apache HTTP Server, Nginx, or deploying XWiki as the root web application. | ||
| 13 | |||
| 14 | On an instance serving several wikis, the URL also decides which wiki answers the request. [[Wiki URL Resolution>>doc:documentation.xs.admin.urls.url-resolution.WebHome]] gives the two algorithms XWiki uses, path-based and domain-based, and [[Switch to Domain-Based URLs>>doc:documentation.xs.admin.urls.switch-domain-based-urls.WebHome]] is the change from one to the other. | ||
| 15 | |||
| 16 | URLs also go the other way, from the wiki out to other sites. [[Configure Interwiki Links>>doc:documentation.xs.admin.urls.configure-interwiki-links.WebHome]] registers the short prefixes that let a page link to an external wiki by name instead of by address. | ||
| 17 |
