The topic of redirects is dealt with in TYPO3 by a separate module called "Redirects" (to be found in the left-hand column under "Site Management").
Redirects play a particularly important role when the URL of a resource (especially a page, e.g. because it has been deleted or moved) changes. This is not a problem for internal links (i.e. links within one's own TYPO3 installation):
if a page is moved, the internal link automatically links to the new page (because the internal page ID remains the same)
if the page is deleted, the link is also deleted. The anchor text remains (it is just no longer clickable).
Of course, this is not possible for incoming links from external websites. Here, a redirect must be created. And this is done via a so-called redirect (see left column in the TYPO3 backend):
In addition to specifying the new and old path, the type of forwarding is also important:
307 Temporary Redirect (the redirection will only apply temporarily, client should continue to use the original URL)
308 Permanent Redirect (similar to 301, only this code forbids the change of the request from POST to GET).
301 Moved Permanently (classic redirection, which tells the request (e.g. the search engine) to use the new URL in the future).
302 Found (similar to 307, POST can be converted to GET request)
303 See Other (Destination address is an "alternative suggestion" for the original URL)
If the URL of a page changes (e.g. because the page name is changed or the page is moved AND the slug is updated), TYPO3 automatically sets a corresponding redirect so that incoming links from outside do not run into a 404 error.
When the page is saved, a dialogue appears with which this redirect ("Revert redirects only") or even the slug change itself ("Revert update") can be undone:
Avoid automatic redirects
Setting automatic redirects can lead to circular references. If, for example, a page is moved back and forth twice, this page can no longer be called up (the browser then reports the error TOO_MANY_REDIRECTS), because TYPO3 has created two redirects that refer to each other.
To avoid automatic redirects, change the yaml-file in the sites directory (for composer installations in the installation directory under config, otherwise in the typo3conf directory) by setting the following parameter to false:
Avoid too many redirects
Avoid a large number of redirects in this module, as this can slow down the system and thus affect page speed .Instead, use the .htaccess