Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

It's not the same without you

Join the community to find out what other Atlassian users are discussing, debating and creating.

Atlassian Community Hero Image Collage

How to properly redirect pages in Confluence?

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.

3 answers

1 accepted

4 votes
Answer accepted

Hi Sorin,

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

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!

I picked the Customware one, as it seems to work with most Confluence versions.

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

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.

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

Does this plugin also work with ScrollVersions (from k15t)?

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

Like Bernd Schneider likes this

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?

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

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

Suggest an answer

Log in or Sign up to answer
TAGS
Community showcase
Published in Confluence

Confluence Mythbusters: Does Atlassian even use Confluence?

Hi, Confluence collaborators! As part of #Confluence-Collaboratory month, we’ve created a very special Mythsbusters segment, where we're dive into an interesting myth and uncover the truth behind i...

1,390 views 7 29
Read article

Community Events

Connect with like-minded Atlassian users at free events near you!

Find an event

Connect with like-minded Atlassian users at free events near you!

Unfortunately there are no Community Events near you at the moment.

Host an event

You're one step closer to meeting fellow Atlassian users at your local event. Learn more about Community Events

Events near you