Knowledge Base

Redirect Module

Last Modified:
13 May 2020
User Level:
Administrator +

The Redirect Module (also referred to as the Smart 404 Page) is a script that handles redirects from short URLs to long URLs, or redirects from old URLs to new URLs.

It is placed the header of a 404 Page. When a website visitor gets to the 404 Page, the module checks the referrer URL (the page that the visitor was trying to access). If that referrer URL is configured as a redirect, the module will redirect the visitor to the relevant new/long URL, and sends the relevant 302/301 response to the browser. If that referrer URL is not configured as a redirect, then the 404 page is displayed.

A zip of the required application files is available here.
(Community Site log-in required)

Redirect Module Guides

Features

CSV or Content

When configuring the Redirect module, there is the choice of using:

  • a CSV file of redirects (from URLs, and target URLs), that is uploaded through Terminalfour
  • individual Content Items added for each redirect that is required

The benefit of the CSV file is that it is much quicker and easier to create the initial batch of redirects. But, the target URLs (the URLs to which you are redirecting) are all hard-coded. This means that if the URL for the target page changes, it needs to be manually updated in the CSV file. The benefit of the individual Content Items for each redirect is that the target page is selected using a Section Link element, and the link is therefore created, managed and updated by Terminalfour if the URL changes.

Response Code

If using individual Content Items for each redirect, it is possible to configure whether the redirect is a permanent redirect (Error 301) or temporary redirect (Error 302). This sends the appropriate message to the browser, and to any relevant search engines trying to access and index the page, that the page has permanently or temporarily moved.

This is not currently possible when using the CSV file approach.

Wildcards

It is possible to use a wildcard character in the From URL, To URL, or Both URLs (although specifying it in the To URL without specifying in the From URL will be nonsensical). Further examples are provided in the Redirect Module Installation guide.

Back to top