b13/slash-force

There is no license information available for the latest version (1.0.1) of this package.

Forces a slash on URLs by redirecting.

Installs: 1 987

Dependents: 0

Suggesters: 0

Security: 0

Stars: 1

Watchers: 8

Forks: 0

Open Issues: 0

Type:typo3-cms-extension

1.0.1 2024-03-27 08:49 UTC

This package is auto-updated.

Last update: 2024-04-27 09:04:10 UTC


README

Whether you configure a page type to end in a slash or not, TYPO3 will always allow you to access the page with or without a trailing slash. This can lead to duplicate content issues, and is generally not a good idea.

This extension will redirect any URL that does not end in a slash to the same URL with a slash if the current page type is configured like this.

Configuration

Install the extension. It will look for any page types in the site configuration, that are configured to end in a slash.

routeEnhancers:
  PageTypeSuffix:
    type: PageType
    default: /
    index: ''
    map:
      /: 0

For these page types, any URL that has a path, that does not end in a slash will be redirected to the same path with a slash.

Credits

This extension was created by Daniel Goerz in 2023 for b13 GmbH, Stuttgart.

Find more TYPO3 extensions we have developed that help us deliver value in client projects. As part of the way we work, we focus on testing and best practices to ensure long-term performance, reliability, and results in all our code.