Bug #56423
closed
Page shortcuts redirect with HTTP Status 301 and get cached on some devices
Added by Christoph Dörfel over 10 years ago.
Updated about 6 years ago.
Description
We recently had the problem of iOS caching redirects caused by the page shortcut mode "link to first subpage".
In TypoScriptFrontendController::checkPageForShortcutRedirect() the only exception from the standard 301 redirect is SHORTCUT_MODE_RANDOM_SUBPAGE, which is a 307 redirect.
I believe that all shortcut modes except for SHORTCUT_MODE_NONE should be handled as 307 redirects, since shortcuts are dynamic and subject to change.
Of course SEO experts won't be too happy about such a code change but at least the chance for errors would be reduced significantly (and developers' headaches too).
- Status changed from New to Under Review
- Status changed from Under Review to Resolved
- % Done changed from 0 to 100
Mario Colombo wrote:
Is this really a good idea?
Please read https://forge.typo3.org/issues/15128
Hi Mario
From a technical point of view (NOT a SEO point of view as I stated before) this is the correct behaviour (using a temporary redirect on a link that is subject to change).
IMHO the method of redirection should be configurable (to a 301 redirect if you so desire) but the default behaviour should be a temporary redirect because this solves some serious technical problems (blame iOS).
Can we agree on making a feature request for choosing the type of redirect (or setting it globally through TYPO3_CONF_VARS)? That would be the best solution for both of us I guess :)
Somehow the link to the review server results in "Not found". Can someone fix this?
Hi guys,
TYPO3 seems to use HTTP Status 307 for all page shortcut modes. This is really bad from a SEO point of view as stated above. Could you pls make this at least configurable for people who still want to use a 301 HTTP status for the starting page shortcut?
Thank you very much!
Lars
Hi,
i give Lars Zimmermann my vote.
I think it's a bad practice to change this hardcoded to 307.
This bugfix does not fix the problem. It causes the next generation of bugs.
Why not write it like in the jumpUrl function: same php file near line: 3029
- code example #####
$statusCode = HttpUtility::HTTP_STATUS_301;
if ($TSConf['TSFE.']['jumpURL_HTTPStatusCode']) {
switch ((int)$TSConf['TSFE.']['jumpURL_HTTPStatusCode']) {
case 301:
$statusCode = HttpUtility::HTTP_STATUS_301;
break;
case 302:
$statusCode = HttpUtility::HTTP_STATUS_302;
break;
case 307:
$statusCode = HttpUtility::HTTP_STATUS_307;
break;
}
}
- code example #####
ps.: from seo view this line is also not really correct.
//jumpUrl function:
3099: $statusCode = HttpUtility::*HTTP_STATUS_303*;
if ($TSConf['TSFE.']['jumpURL_HTTPStatusCode']) {
...
- Status changed from Resolved to Closed
Also available in: Atom
PDF