×

You're using an outdated browser

For a better experience, keep your browser up to date. Check here for the latest version.

Manual

Configure global URL redirects

Nils Bier

Nils Bier Last update: Aug 14, 2018

Scroll Viewport provides functionality for defining permanent and temporary redirects from one page to another. After reading this page, you should be able to maintain redirects.

Define a new redirect

  1. Click the cog icon at top right of the screen and select Confluence Admin.
    The Administration Console is displayed.
  2. In the Scroll Viewport section, click URL Redirects.
    The URL Redirects Management is displayed. The page consists of a table, showing all currently active redirects:


  3. Click Create to define a new redirect.
    The Create Redirect screen is displayed.


  4. Enter the following information:
    1. Enter an Incoming URL. At this point, you have two options:
      1. You can enter an absolute HTTP-address - In this case, the redirect will only be applied if a request matches this addess exacty.
      2. You can enter a path starting with "/" - Scroll Viewport will automatically prefix the path with your current Confluence baseUrl.
    2. Enter a Mode. In both cases you can use glob-pattern for covering a bigger range of incoming-URLs (see next chapter for more information). With glob-pattern you can use wildcard-characters. If you want to use this in your incoming-URL, select Glob Pattern from the drop-down field.
    3. Enter the Target URL.
      (info) This is the URL, to which the user will be redirected if the redirect is being applied by Styles-Plugin. A Target-URL can either be an absolute or a path-based.
    4. In addition to that you can choose between different Redirect-Types. The following two redirect-types are available:
      1. 301 (Moved Permanently)
      2. 302 (Moved Temporarily)
  5. Click Save for saving and activating the redirect.

After completion, the newly created redirect should be listed in the table.

Examples

Here are some examples for defining Incoming- and Target-URLs:

Example 1 (absolute Incoming-URL):

Incoming URL = http://www.k15t.com/display/Software

In case of using an absolute Incoming URL,the redirect is only applied if the requested URL is fully equal to the entered Incoming URL.

Example 2 (path-based Incoming- and Target-URL):

Incoming URL = /Software/Scroll+Versions

Target URL = /software/scroll-versions/documentation

In this case, Scroll Viewport automatically prefixes the paths with the Confluence-baseUrl, so this is a short notation for absolute URLs.

Using a glob-pattern in your incoming URL

As previously mentioned, you can use a regular expression for defining the Incoming URL. Regular expressions (Regex) are patterns used to match character combinations in strings. This section will walk you through understanding how to define Regex-based redirects in Scroll Viewport.

You will be able to define regular expression for the incoming URL and if matched the Http-Request will be redirected to the defined target url. Just like other redirect types, you need to define your Incoming Url pattern and the the desired target. It also provides the possibility of using capture groups in the target URL in order to implement redirects for multiple locations at once.

Info

Please consider the following limitations for Regex-based redirects:

  1. No start-of-input or end-of-input matcher allowed.
  2. Absolute URL expressions must start with 'http://' or 'https://', there is no matching allowed there.

If enabled, each HTTP-Request will be matched against the regular expression.

  1. Use the text field Incoming URL for entering a regular expression.
  2. Enable the checkbox below for enabling regular expression matching.

Ignored Paths

When configuring the path prefix for a viewport, some path prefixes are not allowed, as they override an existing Confluence path prefix.

The following path prefixes are not allowed:

  • /admin
  • /ajax
  • /display
  • /download
  • /images
  • /includes
  • /json
  • /plugins
  • /pages
  • /label
  • /jcaptcha
  • /s
  • /x
  • /rest
  • /spaces
  • /styles
  • /rpc
  • /rest
  • /favicon.ico

  • /noop.jsp

  • /login.action


Examples

Incoming URL = http://www.example.com/confluence/.* 
Target URL = http://www.example.com/confluence/destination

In this case every URL which contains the base url http://www.example.com/confluence will be redirected to path /destination.

Incoming URL = http://www.example.com/confluence/.*/red(ai|i|ie)rect
Target URL = http://www.example.com/confluence/test/target-url

This will select every URL which starts with red and only one of the words aii, or ie in the middle and rect at the end.

Incoming URL = http://www.example.com/confluence/.*/(redire.*)
Target URL = http://www.example.com/confluence/test/$1

As you see, the capture group has been defined in the target URL, then the redirection will be varied based on the incoming URL.

For instance, the request http://www.example.com/confluence/test/redirect1 will be redirected to  http://www.example.com/confluence/test/redirect1 while a request with URL http://www.example.com/confluence/test2/redirect2 will lead to this Url http://www.example.com/confluence/test2/redirect2.

2x2.9
We use cookies to create a secure and effective browsing experience for our website visitors and to understand how you use our site (i.e. Google Analytics). For more information: click here.
Ok