Project

General

Profile

Actions

Feature #16318

closed

Patch: new option TSFE.jumpUrl_prefer301 = 1

Added by Digital District almost 18 years ago. Updated over 13 years ago.

Status:
Closed
Priority:
Should have
Assignee:
Category:
Communication
Target version:
-
Start date:
2006-07-04
Due date:
% Done:

0%

Estimated time:
PHP Version:
4.3
Tags:
Complexity:
Sprint Focus:

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


Related issues 1 (0 open1 closed)

Related to TYPO3 Core - Bug #17320: Wrong http-header on Domain-Redirect. Should be 301 instead of 302ClosedJeff Segars2007-05-21

Actions
Actions #2

Updated by Sebastian Kurfuerst over 17 years ago

keyword:t3dd06

Actions #3

Updated by Ingo Schmitt over 17 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

Actions #4

Updated by Ingo Schmitt over 17 years ago

Fixed in Revision 1685 on t3dd 2006

Actions #5

Updated by Ingmar Schlecht over 16 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

Actions #7

Updated by Benni Mack almost 16 years ago

What's the status here?

Actions #8

Updated by Stefan Geith almost 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).

Actions #9

Updated by Benni Mack almost 16 years ago

Hey Stefan,

want to send it to the core list?

Actions #10

Updated by Stefan Geith over 15 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.

Actions #11

Updated by Stefan Geith over 15 years ago

Created new Patch using t3lib_div::HTTP_STATUS_30?
File: 0003787-TSFE_jumpURL_HTTPStatusCode-V3.patch

Sent to corelist.

Actions #12

Updated by Jeff Segars over 15 years ago

Committed to trunk in rev. 4399. Thanks!

Actions

Also available in: Atom PDF