Hide the View Action in URLs

Last modified by Eleni Cojocariu on 2026/10/30 22:33

Steps

Make XWiki accept and generate URLs without their /view/ action segment, the last of the three parts described in Short URLs.

  1. Set xwiki.showviewaction to 0 in xwiki.cfg, the key described on URL Configuration Properties.
    xwiki.showviewaction=0
  2. Restart XWiki.
  3. 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.

Related

Get Connected