How to properly redirect pages in Confluence?
Asked by Sorin Sbarnea (Citrix):

I have several pages that were merged into a single one but people with bookmarks to the old pages are not redirected.

How do I redirect from one URL to another in Confluence?

Now: people do see the "Page Deleted" page.


Answers:
author: AlysonA
body: Hi Sorin,

In terms of plugins solution, you can refer to the following ones:

* [Customware Redirection plugin](https://marketplace.atlassian.com/plugins/net.customware.confluence.plugin.redirection)
* [Advanced Redirection plugin](https://marketplace.atlassian.com/plugins/com.hascode.confluence.plugin.redirection-plugin)

Both of the above plugins will help you managing page redirection. Just be sure to check whether the above plugins are compatible with the Confluence version you're running.

Hope it helps!

comments: author: Sorin Sbarnea (Citrix)
body: I picked the Customware one, as it seems to work with most Confluence versions.


author: AKASH BHARDWAJ
body: I have Confluence 5.2.5 version, Can anyone please help me how to Redirect from old space to new Space. I have old space with contents but now i have merged those contents to new space, people visiting the old space and its pages should be redirected to new space.

Please let me know how can i achieve this.

Thanks \& Regards,

Akash


author: Steve
body: We were struggling to redirect Confluence pages, there was nothing that worked for us on the marketplace, so we decided to build something for ourselves. It works so well we just put it on the marketplace as [Easy Redirection for Confluence cloud](https://marketplace.atlassian.com/apps/1224699/easy-redirection-for-confluence-cloud?hosting=cloud&tab=overview).

If you're planning a move to the cloud it might help, it's cloud only.


author: Bernd Schneider
body: Does this plugin also work with ScrollVersions (from k15t)?

comments: author: David _K15t_
body: Hi Bernd,

the way those apps are functioning, they should be working just fine with Scroll Versions, provided the user has all the correct permissions.

Depending on the exact case, it might also be a good idea to redirect to change pages directly.

Cheers,

David


author: Bernd Schneider
body: Thanks, David!

The exact case is: If I have a page under version control, say page A. And I have a page in the same space, say B. I want to redirect a request for B to be redirected to A - especially without the need to specify the version (in a ScrollVersions space everything should refer to the version selected by the user.

So the user selected to work with version X: page B in version X shall be redirected to page A in version X

User changes to version Y: now page B in version Y shall be redirected to page A in version Y - without specifying the version in the redirect macro which would spoil the version sensitivity.

Does this work?


author: David _K15t_
body: Hi Bernd,

unfortunately, I don't think those macros can be made version-sensitive easily.

You are correct about the general premise of every link usually linking within the currently selected version, despite the actual link pointing toward the master page. That is achieved by Scroll Versions by detecting and changing all the page links when viewing a Confluence page.

The macros from the apps above seem to have a fixed URL or page link that aren't picked up by Scroll Versions' link fixer. This means, you'd have to configure the redirect individually for every version.

If you're looking for simple redirect functionality, it's probably easier to just create a user macro that also displays the link on the page, allowing it to get fixed using Scroll Versions' link fixer.

Here's something I quickly threw together as a PoC:

![Screen Shot 2020-10-16 at 09.31.08.png](https://community.atlassian.com/t5/image/serverpage/image-id/114555i794F93098CE699F6/image-dimensions/255x191?v=v2 "Screen Shot 2020-10-16 at 09.31.08.png")

Here's the code within the macro definition:

```
## @noparams

<div class="confluence-information-macro confluence-information-macro-note conf-macro output-block" data-hasbody="true" data-macro-name="scroll-versions-redirect">
<span class="aui-icon aui-icon-small aui-iconfont-warning confluence-information-macro-icon"> </span>
<div class="confluence-information-macro-body scroll-versions-redirect-macro">
$body
</div>
</div>

<script>
setTimeout(function(){
window.location.href = $(".scroll-versions-redirect-macro a").attr("href");
}, 3000);
</script>
```

This macro looks and functions like the Confluence note macro, but also redirects you to the link in its body after 3 seconds. Since the link is on the page, it should be version-sensitive. You'd just need to make sure there is exactly one link in the body of the macro, otherwise strange things might happen.

Let me know what you think.

Cheers,

David


Tags: redirect