2

TYPO3 vers. 4.5 Doing an extension. Based on a condition in my extension class I need to add a noindex header.

This should work - but does not:

header('X-Robots-Tag: noindex,nofollow');

How can I make TYPO3 accept custom headers?

BR. Anders

UPDATE: These lines work much just fine. Case closed:

// MAY BE DUBLICATE CONTENT - DO NOT LET GOOGLE INDEX
$GLOBALS['TSFE']->additionalHeaderData['tx_myext'] = '<meta name="robots" content="noindex, nofollow">';
4

1 回答 1

2

It just has to be added the TYPO3-way:

//print 'MAY BE DUBLICATE CONTENT - DO NOT LET GOOGLE INDEX';
$GLOBALS['TSFE']->additionalHeaderData['tx_myext'] = '<meta name="robots" content="noindex, nofollow">';
于 2013-03-22T13:25:32.550 回答