Project

General

Profile

Actions

Bug #88838

closed

Improved 404 handling for multi-lingual websites

Added by Chris Müller almost 5 years ago. Updated over 4 years ago.

Status:
Closed
Priority:
Should have
Assignee:
-
Category:
Link Handling, Site Handling & Routing
Target version:
-
Start date:
2019-07-24
Due date:
% Done:

100%

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

Description

With TYPO3 v9 the site configuration with its own 404 handling comes in. But it has a drawback: When you have a site configuration with multiple languages which results in URLs like /de/, /en/, /fr/ and now a URL which starts with /abc a redirect (307) to the default language is performed.

This is not optimal because of the following reasons:

  • Under SEO aspects: it seems to a search engine, that the old URL can be still valid (it's only a temporary redirect) so the URL can still be inside the search results.
  • Under UX aspects: The user clicks on a link, comes to the home page and doesn't find what he wants, and leaves (frustrated)
  • If you link to that page (from another website) which has this behaviour, you get no information from link validators, that this page has gone (and cannot update or remove the link)

I also had the discussion some time ago, that it is not known, which language the 404 page should be shown. If I want to have this, I should use the default language under the path / and not /de. This is not always possible (we use / to determine the browser language and make a redirect to the according website language).

It is the better alternative to have a 404 page in the default language instead of the redirect.


Related issues 1 (0 open1 closed)

Has duplicate TYPO3 Core - Bug #89035: URLs with invalid language path segment are redirected to default languageClosed2019-08-28

Actions
Actions #1

Updated by Dieter Porth almost 5 years ago

You can build a dataprocessor for your 404 site, which will analyze the language of the browser.

You can use javascript to detect the language loading further information via Ajax. (I think, this is the best option.)
https://stackoverflow.com/questions/8199760/how-to-get-the-browser-language-using-javascript

A searchengine-robot does not generate links. If you make a relaunch, you should take care about the old links. That's the task of TYPO3 and its 404-mechanism.

I think the solution of TYPO3 9 is good enough.

Actions #2

Updated by Oliver Hader almost 5 years ago

  • Tracker changed from Feature to Bug
  • TYPO3 Version set to 9
Actions #3

Updated by Gerrit Code Review almost 5 years ago

  • Status changed from New to Under Review

Patch set 3 for branch master of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61346

Actions #4

Updated by Gerrit Code Review over 4 years ago

Patch set 1 for branch 9.5 of project Packages/TYPO3.CMS has been pushed to the review server.
It is available at https://review.typo3.org/c/Packages/TYPO3.CMS/+/61356

Actions #5

Updated by Oliver Hader over 4 years ago

  • Status changed from Under Review to Resolved
  • % Done changed from 0 to 100
Actions #6

Updated by Helmut Hummel over 4 years ago

  • Has duplicate Bug #89035: URLs with invalid language path segment are redirected to default language added
Actions #7

Updated by Benni Mack over 4 years ago

  • Status changed from Resolved to Closed
Actions

Also available in: Atom PDF