Access Keys:
Skip to content (Access Key - 0)

Adaptavist Documentation Move

This documentation is deprecated. Adaptavist's documentation has moved to a new location where it is maintained and updated. Please visit Adaptavist's new Documentation area.

redirect macro

The {redirect} macro will automatically redirect the browser to an alternate web page either within your own site or on an external site...

There are several circumstances under which you may require this macro:

  • You have moved content to another space or site but people are still visiting the old location - the macro will automatically take them to the new location
  • You want to provide a static URL to some information that changes location occasionally - hand out the fixed URL and use the macro to automatically redirect the user to the current destination URL


The {redirect} macro has the following parameters:

Parameter Required Default Notes
default   The default "location" parameter specifies the target destination - either a page title from your own site or an external URL.
delay 0 The amount of time to wait, in seconds, before automatically redirecting the user to the target page.
location   The external URL to redirect to.


When using this macro, please bear the following points in mind:

  • This macro does not keep track of whether the target page has had its name or URL changed and as such it's possible for the link to break
  • To edit a page which redirects instantly, manually add '?redirect=false' to the URL of the page that contains the redirect.
  • This macro uses JavaScript to redirect, so browsers with JavaScript turned off will require the user to manually click a link to take them to the target location.


Hints and Tips:

When you are first adding the macro to a page, set a delay of something like 20 seconds - this way, if there is a problem with the redirect, it's much easier to redisplay the page and edit it to fix the URL, etc. Once you are happy that the redirect is working, you can easily reduce or remove the delay.

Frequently Asked Questions:

Q I merely want to redirect to a page with a similar name, is there an easier way?
A Yes. Use the alias macro.

See Also:

View old comments

Adaptavist Theme Builder Powered by Atlassian Confluence