Project

General

Profile

Actions

Bug #102901

open

Automatically created redirects can point to the same URL as the source

Added by Philipp Wrann 10 months ago. Updated 10 months ago.

Status:
New
Priority:
Should have
Assignee:
Category:
Link Handling & Redirect Handling
Target version:
Start date:
2024-01-23
Due date:
% Done:

0%

Estimated time:
TYPO3 Version:
11
PHP Version:
8.2
Tags:
Complexity:
Is Regression:
Sprint Focus:

Description

If you update a slug, typo3 will create a redirect that removes all additional query params ("Keep GET Parameters" = off).

It may happen, that - through changing of slugs - a redirect is created, that effectively looks this way:

curl -I 'https://my.site/path/to/page?type=200&cHash=someCacheHash'

HTTP/2 307 
content-type: text/html; charset=UTF-8
x-redirect-by: TYPO3 Redirect 101
location: https://my.site/path/to/page

So when generating those links in your fluid template you will never receive the content you want to load, you will always load page type 0.

This affects all required query parameters.

My suggestion:
If the source and the generated target url are the same:

1) dont send the redirect
2) if not protected, delete the obsolete redirect

Actions

Also available in: Atom PDF