Usage 

Redirects module 

Access the redirects module in the TYPO3 backend under Sites > Link Management > Redirects.

The Link Management overview in the Sites menu with the Redirects, QR Codes and Short URLs modules

Open the Redirects module from Sites > Link Management

List 

Redirect list

You will see a list of the existing redirects with the following columns labels.

  1. Source Domain
  2. Source Path
  3. Target
  4. Created: Avatar and name of the backend user who created the redirect, and the creation date
  5. Count: Number of "hits" (only if hit counter is on)
  6. Last Hit on: When was the most recent redirect "hit" (only if hit counter is on)
  7. Action buttons: View page, edit, disable and delete

It is also possible to sort by clicking on the Source Host, Source Path, or Created column headers and changing the sort order by clicking again, as also done elsewhere in the backend.

By clicking on the Source Path of one of the columns or on the pencil edit icon , you can edit the record. Clicking on a link in the Destination column, should open the link target.

The + sign on the top will open an edit form to create a new redirect.

It is also possible to filter, e.g. by the Source Path, Status Code, Creation type, Created by, Protected or only show redirect records which were "Never hit" (see Information on Hit counter which must be explicitly enabled via Feature Toggle).

Changed in version 14.3.8 Feature: #107755 - Add creation information for redirects

Before, the creator and the creation date were only shown in the edit form of a redirect.

The filter Created by lists the redirects of one backend user. Redirects whose creator has no backend user record, because the creator was not tracked or the user was deleted, are labelled as such.

Edit form 

When creating a new redirect or editing an existing one, the edit form will open.

A redirect generally consists of these 2 parts which are separated in the edit form:

  1. A source part (host, path, query parameters) which is matched against the URL. If it matches, the redirect is applied
  2. A target part which defines where the redirect should redirect to and some additional parameters like the HTTP status code, whether to force HTTPS and keep query parameters

Also, the redirect has some additional parameters that are specific for the redirect record but not relevant when generating the redirect, such as the Protected field.

Admin users will see the respective database fields from the table sys_redirect in square brackets (e.g. Source Domain [source_host]) next to the label if in debug mode.

Non-admin users may not see all the fields. By default Source Domain, Source Path and Target are enabled, the rest are exclude fields and must be enabled in the backend group permissions, see backend user configuration.

General tab 

Edit redirect


Source:

Source Domain
Field

source_host

It is possible to select one of the domains from the site configuration or use the wildcard (*). In this case the redirect applies to all sites!

Source Path
Field

source_path

Can be an actual path, e.g. /path. For URLs with different entry points for languages, you should use the full path, e.g. /en/path. Regular expressions are possible, but then is_regexp must be enabled. Regular expressions must be enclosed in delimiters, e.g. #^/path/([a-zA-Z]{1}[a-zA-Z0-9_/-]+)# or /^/path/([a-zA-Z]{1}[a-zA-Z0-9_/-]+)/.

Respect GET Parameters
Field

respect_query_parameters

If on, matching is also performed on query parameters. If off, matching is only performed on the path.

Is regular expression?
Field

is_regexp

Evaluate the Source Path as regular expression.


Target:

Target
Field

target

The redirect target, can be a

  • path, e.g. /features
  • URL, e.g. https://example.org/features
  • page ID or page URI, e.g. t3://page?uid=1
  • file URI, e.g. t3://file?uid=1
  • path with reference to regular expression capturing group if the regular expression feature is used with e.g. capturing groups in Source Path, e.g. /newpath/$1
Status Code HTTP Header
Field

target_statuscode

The HTTP status code that will be sent to the client. This is 307 (Temporary Redirect) by default.

Force SSL Redirect
Field

force_https

When redirecting, use HTTPS when constructing the target URL. This will even be the case, if a full URL is given as target (e.g. http://example.com/features) or if the entry point of a site uses HTTP, so make sure your site supports HTTPS (which is recommended anyway).

Keep GET Parameters
Field

keep_query_parameters

When redirecting, add query parameters of original URL (with possible changes) to the target. By default, the query parameters are omitted, so source URL https://example.com/features?abc=1 would be redirected to https://example.com/all-features. If there are already query parameters in the target field, these are used instead.

Protected
Field

protected

This does not affect the redirect itself. It protects the record from automatic deletion (e.g. with redirects:cleanup).

Creation Type
Field

creation_type

This field allows to differentiate between redirects that are created automatically when the slug of a page is changed and those that are created in the backend module by editors.

Integrity Status
Field

integrity_status

This field hints about a broken redirect, for example, if the page references to itself.

Statistics tab 

Statistics tab with hit counter

This tab is only available, if the hit counter is enabled. Here you can disable the hit counter for a specific redirect and also see read-only statistics.

Hit Counter
Field

disable_hitcount

Disable the hit counter only for this redirect.

Count
Field

hitcount

Editable

read only

Number of hits for this particular redirect. (How often was the page accessed which triggered this redirect?)

Last Hit on
Field

lasthiton

Editable

read only

When was the last hit on this redirect?

Created At
Field

createdon

Editable

read only

When was this redirect created?

Access tab 

Enabled
Field

disabled

If disabled, the redirect has no effect.

Start
Field

starttime

If this is not empty, "now" (current time) must be after Start time for the redirect to have effect.

Stop
Field

endtime

If this is not empty, "now" (current time) must be before Stop time for the redirect to have effect.

Notes 

Description
Field

description

Add context to the corresponding redirect. The added information is also displayed in the "Record information" info box above the edit form.

Regex examples 

Example 1: Source path with regular expression and capturing group 

redirect

Source Path Is Regular Expression target
#^/path/([a-zA-Z]{1}[a-zA-Z0-9_/-]+)# true https://example.org/newpath/$1

with the following result:

URL result URL
https://example.org/path/something https://example.org/newpath/something

Example 2: Source path with regular expression, capturing group and relative target 

redirect

Source Path Is Regular Expression target
#^/another/path/([a-zA-Z]{1}[a-zA-Z0-9_/-]+)# true /newpath/$1

with the following result:

URL result URL
https://example.org/another/path/something https://example.org/relative/newpath/something

Using a relative target is necessary if a redirect must work on multiple domains or multiple environments.

Short URLs module 

A short URL is a short path on one of your domains, for example https://example.com/spring, that redirects visitors to a target. Use short URLs in print material, newsletters, or social media posts.

Access the module in the TYPO3 backend under Sites > Link Management > Short URLs.

The Short URLs module with a list of two short URLs

The Short URLs module

The list shows the short URL, the target, and the note of each short URL. Filter the list by Source Domain, Source Path, or Target. Click the copy button of a short URL to copy the complete URL, including the protocol and the domain, to the clipboard.

Short URLs are redirect records of the type Short URL. The Redirects module does not list them.

Create a short URL 

  1. Click Add Short URL.
  2. In Short URL, select the domain and enter a path, for example /spring. To get a random path with eight characters, click the Generate Short URL button (dice icon) next to the path.
  3. In Target, select the page, file, or URL that the short URL redirects to.
  4. Click Save.
Form to create a short URL with a domain and a generated path

A new short URL with a generated path

A short URL must be unique for its domain. The form marks the domain and the path if another short URL already uses them. TYPO3 also rejects a duplicate when you save.

After you saved a short URL, you cannot change its domain and path. Shared links keep working this way. You can change the target at any time. The edit form also has a button to copy the short URL.

Automatic redirects creation 

Redirects are created automatically on slug changes, if EXT:redirects is installed and automatic creation is enabled in site configuration.

A redirect from the old URL to the new URL will be created. All sub pages are checked too and the slugs will be updated and redirects will be created for these as well.

After the creation of the redirects a notification will be shown to the user.

Revert redirect

The notification contains two possible actions:

  • revert the complete slug update and remove the redirects
  • or only remove the redirects