Issue Feature Closed

#93982Redirect Demand: Allow multiple targets and source_paths

Guido Schmechel 04/24/21, 16:23 updated 11/19/26, 11:06

Description

Currently, only one target and one source path are allowed for redirect requests. This is passed as a string to the demand. In contrast, you can pass the host with an array.

=> typo3/sysext/redirects/Classes/Repository/Demand.php

The RedirectRepository (typo3/sysext/redirects/Classes/Repository/RedirectRepository.php) and its function getQueryBuilderForDemand could be a little bit more flexible. We could change from string to array and add the constraints with a for loop.

Advantage: It is easier to merge the demands and thus use a pagination from the core. This as support for a third-party extension.

Hint: This would be breaking and may only be implemented from v12

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.

History 2

  1. Benni Mack commented and changed status New Closed <span data-processor="relativetime" data-value="2026-11-19T11:06:17+00:00" > 11/19/26, 11:06 </span>

    Thanks for the suggestion. `TYPO3\CMS\Redirects\Repository\Demand` is marked `@internal`. It only backs the filter form of the Redirects backend module and the `redirects:cleanup` command. In the module, source path and target are free-text fields searched with `LIKE`, while hosts and status codes are exact-match selections, so the asymmetry is intended.

    Since the class isn’t public API, we won’t widen it for third-party use. An extension that needs to combine several filters can query `sys_redirect` directly with the QueryBuilder and handle its own pagination.

    I’m closing this issue. If there’s a use case inside the Redirects module itself, feel free to reopen it.