Dashboard > Atlassian Plugins > ... > Macros > redirect
  Atlassian Plugins Log In | Sign Up   View a printable version of the current page.  
  redirect

Added by David Peterson , last edited by David Peterson on Feb 28, 2007  (view change)
Labels: 

{redirect}

Plugin: Redirection Plugin

This will redirect the browser to the specified page or URL.

Usage

{redirect:[Page,^attachment.ext,http://wherever.com]|delay=[seconds]}

Parameters

Name Required Default Description
[default]/location
Specifies the Confluence content or URL to redirect to. Eg. Another Page, ^attachment.ext or http://www.randombits.org/.

Note: If the external URL contains an '=' character, you must specify it using the 'location' parameter name, or you will get error messages asking for the URL.

delay
0
The number of seconds to delay before redirecting the browser.

Examples

I have some software which is updated semi-regularly. To make it easy to link, I want a single 'Release Notes' page which is updated to have the latest notes in it. However, I also want to keep an archive of previous release notes too.

  1. Create a release notes page called 'Release Notes 1.1'
  2. Create another page called 'Release Notes' with the following contents:
    {redirect:Release Notes 1.1}

When a new version is released, do the following:

  1. Create a page called 'Release Notes 1.2' with the new notes.
  2. Edit the original 'Release Notes' page by adding '?redirect=false' to the URL. Eg:
    http://www.foo.com/confluence/display/MYSPACE/Release+Notes?redirect=false
  3. Change the contents to:
    {redirect:Release Notes 1.2}

Notes

  • This macro does not keep track of whether the page being redirected to has had its name changed.
  • To edit a page which redirects instantly, add '?redirect=false' to the URL manually.
  • This macro uses JavaScript to redirect, so browsers with JavaScript turned off will have to click through manually.

See Also

Hi,

We are using Confluence2.7.1 and are experiencing some troubles getting the redirect macro working when used in conjunction with the show-to macro.

We are using the following to redirect just logged-in users onto dedicated spaces based on their groups

{show-to:group=group1 {redirect:SHUB}{show-to}

Below is the output of the page:

<div class='panelMacro'><table class='noteMacro'><colgroup><col width='24'><col></colgroup><tr><td valign='top'><img src="/images/icons/emoticons/warning.gif" width="16" height="16" align="absmiddle" alt="" border="0"></td><td><b>Redirection Notice</b><br />This page should redirect to <a href="http://localhost:8080/display/SHUB/Home" rel="nofollow">http://localhost:8080/display/SHUB/Home/a>.</td></tr></table></div><SCRIPT LANGUAGE='JavaScript'>
<!--
location.replace('http://localhost:8080/display/SHUB/Home');
// -->
</script>

USERS

The USERS word comes from a test {show-to:group=group1}USERS{show-to} to check if the show-to macro is working.

Knowing that we are using the 2.7.1 build+redirect2.3+visibility1.6

Is there anything wrong on our approach here?

Thanks,

Bruno

This is due to a bug in Visibility 1.6. Revert back to 1.5 for now to get around this issue.

it works perfectly after downgrading to 1.5.

 Thanks!

 Bruno

Copyright(c) CustomWare Asia Pacific Pty Ltd
Powered by Atlassian Confluence 2.7.3, the Enterprise Wiki. Bug/feature request - Atlassian news - Contact administrators