Feature #16318
closedPatch: new option TSFE.jumpUrl_prefer301 = 1
0%
Description
TSCONFIG:
Property:
jumpUrl_prefer301
Data type:
Boolean
Description:
If you want to redirect to a page using "external Url", by default a 302 (Moved temporarily) is used. If you want to use a 301 (Moved permanently), use this option.
(Patch for T3 v4 attached: class.tslib_fe.php)
Function jumpUrl(), line 2197:
} else {
$TSConf = $this->getPagesTSconfig();
if ($TSConf['TSFE.']['jumpUrl_transferSession']) {
$uParts = parse_url($this->jumpurl);
$params = '&FE_SESSION_KEY='.rawurlencode($this->fe_user->id.'-'.md5($this->fe_user->id.'/'.$this->TYPO3_CONF_VARS['SYS']['encryptionKey']));
$this->jumpurl.=($uParts['query']?'':'?').$params; // Add the session parameter ...
}
// if 301 is prefered instead of 302, send it:
if ($TSConf['TSFE.']['jumpUrl_prefer301'])
Header('HTTP/1.1 301 Moved Permanently');
Header('Location: '.$this->jumpurl);
exit;
}
(issue imported from #M3787)
Files
Updated by Ingo Schmitt over 18 years ago
Better solution with switch/case construct for different codes uploaded with patch: tslib_fe_header_redirect.txt
Still Documentation issu:
page TSConfig new Property:
TSFE.jumpURL_HTTPStatusCode
TYPE Integer/STring
The HTTP Status Code send, when jump-url is used. Default is nor additional header, so php sends an 302. Possible values are 301,302,303,307,
@see http://www.w3.org/Protocols/rfc2616/rfc2616-sec10.html
Updated by Ingmar Schlecht about 17 years ago
Was this committed to real TYPO3 core trunk or just that T3DD06 SVN server?
If it's not in trunk yet, please send a patch to the core list.
Read http://news.typo3.org/news/article/core-development-mailinglist-now-open-for-community-involvement/ and the rules for details.
cheers
Ingmar
Updated by Stefan Geith over 16 years ago
I can't find this in trunk, so it seems that it has been committed to T3DD06 SVN only.
I tested patch 'tslib_fe_header_redirect.txt' (12.08.2006) today and it works for me.
I added a new patch against trunk (R3870).
Updated by Benni Mack over 16 years ago
Hey Stefan,
want to send it to the core list?
Updated by Stefan Geith about 16 years ago
Maybe this should be rewritten, when "#19304: Introduce HTTP_STATUS-Constants" is committed.
I'll change the Code to use the constants as soon as 9313 is committed and create a new patch-file.
Updated by Stefan Geith about 16 years ago
Created new Patch using t3lib_div::HTTP_STATUS_30?
File: 0003787-TSFE_jumpURL_HTTPStatusCode-V3.patch
Sent to corelist.
Updated by Jeff Segars about 16 years ago
Committed to trunk in rev. 4399. Thanks!