#89563Add redirect types
Description
Compared to the extension yoast premium, there are still two types of HTTP missing:
410 Content deleted
451 Unavilable for legal reasons
Reviews 0
No change resolves or names this issue in its commit message, and no comment links one.
Related issues 1
History 12
-
Benni Mack commented and changed status
NewNeeds Feedback 11/04/19, 21:41 -
Guido Schmechel changed assigned to Richard Haeser 11/05/19, 14:20
-
Guido Schmechel commented 11/05/19, 14:20
Maybe Richard can say a little bit about these http types?
-
Richard Haeser commented 11/14/19, 10:50
On https://yoast.com/which-redirect/ you can see the reasons for those two status codes.
I think the 410 should be used more often. See https://yoast.com/deleting-pages-from-your-site/ for more information about that.
The 451 is not used that much but can still be of value.
-
Richard Haeser changed status
Needs FeedbackNew removed the assignee 11/28/19, 19:48 -
Richard Haeser commented 11/28/19, 19:56
But indeed Benni, the 410 and 451 are technically no redirects and no target is necessary as well. Having those options might still be a good idea though.
-
Bastian Stargazer commented 12/13/19, 17:24
I upvote this feature request! After a huge website update I using the Redirect module to map the old page-structure to the new one.
But often not all old URLs having corresponding new ones. Currently I’m using a 301 (Moved Permanent) to redirect the old URL to the index-page, just to avoid a 404 not-found.
I thought about using the 303 (See other) for it, but not sure how Google respond to this.After searching around for a while I also saw articles saying that 410 is good practice for this case.
-
Guido Schmechel commented 12/15/19, 16:52
I tried the subject. Extending the TCA is the least of the problems.
The status code > 400 is not accepted. The trigger seems to be $headers[‘location’] in file \typo3\sysext\core\Classes\Http\RedirectResponse.php. If I comment out this line, the HTTP code also applies. Otherwise 302 is taken.
I’m running out of ideas here, but maybe someone may need the information.
-
Gianluigi Martino commented 04/17/20, 16:25
For me it also doesn’t work if i comment out “$headers[‘location’] in file \typo3\sysext\core\Classes\Http\RedirectResponse.php“
Created a Middleware and using “new RedirectResponse”, but if i try to redirect with 410 or 404, it always redirect with the 302 statuscode (as mentioned by Guido Schmechel).Have somebody a solution to resolve this problme?
-
Richard Haeser changed assigned to Richard Haeser 04/20/20, 09:23
-
Guido Schmechel changed Related to #93882 04/18/21, 17:08
-
Georg Ringer commented and changed status
NewClosed 07/15/24, 14:12problem is that the location header switches it to a 302.
as the 410 is no redirect I hacked together a solution for that usecase https://github.com/georgringer/error_redirects but I am closing this here as it is not a redirect.
maybe once the ext gets integrated in core but there is a solution now
Technically this isn’t a redirect anymore then, right?