URL Mapping

Last modified by Raphaël Jakse on 2026/03/24 13:00

Explanation

URL Mapping is a framework to handle requests from configured prefixes. The initial motivation behind this extension is that some people migrate to XWiki from another wiki solution (for example Confluence, for which we have a extension) or from a CMS and want their old links to still work (because Cool URIs don’t change). Visitors could have mails linking to the old website, or could have bookmark.

The URL Mapping extension provides a convenient way for developers to implement such redirections, and provides a convenient way for administrators to configure such implementations. 

For instance, figure a wiki freshly migrated from Confluence. Many visitors of this wiki still have Confluence links to documents in their history, bookmarks or mails, but after the migration, the documents have of course moved and are accessed through URLs shaped by XWiki instead of URL shaped by Confluence. The URL Mapping extension makes it possible to:

  • for a developer to write a set of URL mappers which will recognize URLs that look like /display/SPACE/Page title, /spaces/SPACE/pages/NNN/Page title and download/attachments/NNN/filename.ext and redirect to the right document or attachment;
  • for an administrator to configure a prefix where these URLs will be expected, so a reverse proxy can direct these old URLs to this prefix without risking to clash with XWiki URLs.
  • for an administrator to configure a redirection screen that automatically redirects after a specified delay and that tells users to update their bookmarks… or, on the contrary, to let the redirects be transparent and immediate

FAQ

Why isn't the URL Mapping module registered and why does it not redirect pages?

This should not happen. If it does:

  1. Please report a bug.
  2. As a workaround, use this snippet to force the registration: Force URL Mapping Registration.

More

To find more about the current topic, you can search or use the table below and filter the columns to narrow your choices.

Get Connected