Issue Feature Closed

#16318Patch: new option TSFE.jumpUrl_prefer301 = 1

Digital District 07/04/06, 10:19 updated 08/06/10, 13:22

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)

Reviews 0

No change resolves or names this issue in its commit message, and no comment links one.