Hide the View Action in URLs
Last modified by Eleni Cojocariu on 2026/10/30 22:33
Content
Steps
Make XWiki accept and generate URLs without their /view/ action segment, the last of the three parts described in Short URLs.
- Set xwiki.showviewaction to 0 in xwiki.cfg, the key described on URL Configuration Properties.
xwiki.showviewaction=0 - Restart XWiki.
- Open any page and read its URL. The action segment is gone, and a URL that still carries it is accepted as before.
before http://server.com/bin/view/Sandbox/WebHome after http://server.com/bin/Sandbox/WebHome
FAQ
What happens to existing links that still contain /view/?
They keep working. Hiding the action changes the URLs XWiki generates, not the ones it accepts.
Does this hide the other actions too?
No. Only view is omitted. edit, delete and the rest still appear in the URL.
xwiki.properties declares a url.standard.hideViewAction key. Should I use that one?
No. Nothing reads its value, so setting it changes no URL. xwiki.showviewaction is the key that works.