Setup Confluence URL Mapping
Steps
How to setup
Define a URL prefix
First, define a URL prefix that will receive requests with old confluence urls. For technical reasons, this prefix must be an alphanumerical string without slashes and dashes.
Assuming your wiki is reachable at https://example.com/xwiki Old Confluence URL will work at:
https://example.com/xwiki/CHOOSENPREFIX/In the reminder of this documentation, we will assume the oldwiki prefix. Handled URLs will look like:
https://example.com/xwiki/oldwiki/pages/viewpage.action?pageId=163919355
https://example.com/xwiki/oldwiki/display/CONF719/Customize+your+SpaceInstall the Confluence URL Mapping extension on XWiki
- Install the Confluence URL Mapping extension in your main wiki.
- Make sure the URL Mapping extension was also installed. It should be, but if it isn't, install it
Configure Confluence URL Mapping
in xwiki.properties, put:
urlmapping.prefixhandlers.confluence.prefix=oldwiki(Replace oldwiki to whatever prefix you want to use)
See the documentation of the URL Mapping module for all the parameters you can use. The configuration name to use for the Confluence handler is confluence.
By default, there's no delay and old URLs are transparently redirected to the new URLs, but you can, for instance, specify a delay and a custom message to let your users know they used an old URL and that they should update their bookmarks.
Configure your reverse proxy
You will need to configure your reverse proxy to route old Confluence URLs (likely /wiki/...) to /xwiki/oldwiki/.... Of course, if your Confluence wiki was hosted at another domain name than XWiki, you will need to handle this old domain and redirect to the new domain as well.
For the reverse proxy routing, you can use redirects, or proxy directives to avoid the extra redirects.
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.
1. As a workaround, use this snippet to force the registration: Force URL Mapping Registration