Redirection in Confluence 4


What would be the preferred way to implement a redirect from a page to an external source in Confluence 4? I'm not finding the "redirect" macro, perhaps it's not part the new version anymore? Confluence newbie here so bare with me... thanks!



4 answers

3 votes
David Simpson Community Champion Oct 11, 2011

It should be pretty easy to do this as a user macro using JavaScript -- if that's deemed acceptable.

Something like this...

## Macro title: Redirect
## Macro has a body: N
## Body processing: No macro body
## Output: Selected output option
## Developed by: David Simpson
## Date created: 2011-10-12
## Installed by: My Name

## This is an example macro
## @param url:title=URL|type=string|required=true|desc=The external webpage to redirect to

Redirecting to: <a id="redirectMe" href="$paramurl">$paramurl</a>

    window.location.replace( AJS.$('#redirectMe').attr('href') );

You'll have fun trying to edit the page after doing this though, so maybe add a setTimeout option :)

Thanks! Yes I thought I have to go with the JS option for now on (until a proper plugin appears... and perhaps with an option that admins won't get redirected to the new place to avoid the problem you mentioned:)

Redirect macro probably works, but plugin needs to be installed manually (download/upload) until the plugin exchange shows a compatible version.

Tried with this one:

Installs ok but won't recognize macro.


And with this one:

Again, installs ok (at least no visible errors on the admin interface), but the forward rules not working. Perhaps wiser to wait for the official version for C4...

Try inserting the markup for the macro using the Wiki Markup Dialog via the Insert menu. It may still work despite not yet being updated to support 4.0 – i9.e. not recogized by the Macro Browser and Macro Autocomplete.

Matt, there is some confusion about the difference between migration mode and fully compatible mode for plugins. It would be helpful if there was some documentation that described for end users how to deal with that. It was really nice for migration that Confluence supported migrated macros but there are lots of gotchas for end users - like your comment above. Specifically, many plugins will work whether or not they have been marked as compatible in the plugin exchange. Marking them compatible, means they can be installed via UPM and used, but may not be upgraded to fully support usage outside of via wiki markup. So instead of 2 choices - it works/doesn't work, there are 3 - it works in migration mode, it works in 4.0 mode, or it doesn't work at all. Unfortunately, there is no easy way to tell the difference. I have tried to head off user difficulties for some of my plugins via Confluence 4.0 compatibility for Table and other plugins

Hey there, we will be updating Redirect to work 'natively' with 4.0, but no timeline currently. Hopefully not too long, but keep an eye on for updates.

Thanks Bob for the reply. Just a clarification.

Our approach with 4.0 is to ensure that macros in existing content continue to work after the upgrade to 4.0.

The use case in this discussion thread is around insertion of macros in new content created after the upgrade. For a macro to appear in autocomplete or in the macro browser, a plugin author must update their plugin. Documentation on how do this can be found here. These instructions have been available since Confluence 3.0, and we encourage all plugin authors to make this change.

Most macros marked as 3.5.x compatible on the plugin exchange should work in 4.0. However, as Bob mentioned, to insert them, you'll need to use the "Insert Wiki Markup Dialog".

Dave, my comment wasn't about plugin authors, but, how general admins/users figure out how migration mode works and the limitations with that. Admins have no way of knowing which is which for macros.


If a plugin is marked as only 3.5.x on PAC, the implication for an administrator is that it most likely will work in what you define as "migration mode" and insertable via the "Insert Wiki Markup Dialog".

A plugin marked as 4.0.x compatible on PAC will work and should be insertable via autocomplete and the macro browser.

Admittedly, this is is not enforced on PAC.

Probably not the place for this discussion, but, I was not aware of any guidance provided on this. I mark 4.0 compatible once it successfully is tested on Confluence 4.0 in migration mode. This enables easy UPM install when testing migration, etc.... UPM doesn't have an option to easily find/install plugins that are not marked compatible.

Suggest an answer

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

Confluence Admin Certification now $150 for Community Members

More and more people are building their careers with Atlassian, and we want you to be at the front of this wave! Important Dates Start the Certification Prep Course by 2 April 2019 Take your e...

212 views 2 10
Read article

Atlassian User Groups

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

Find a group

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

Find my local user group

Unfortunately there are no AUG chapters near you at the moment.

Start an AUG

You're one step closer to meeting fellow Atlassian users at your local meet up. Learn more about AUGs

Groups near you