[TYPO3-core] Reminder: : pageNotFound_handling HTTP status fix

Martin Kutschker Martin.Kutschker at n0spam-blackbox.net
Fri Jun 2 16:25:08 CEST 2006


Dmitry Dulepov schrieb:
> Hi!
> 
> This is a reminder about CVS patch request
> 
> Branch: HEAD, TYPO3_4-0
> 
> Problem: if $TYPO3_CONF_VARS['FE']['pageNotFound_handling'] is set to
> absolute or relative URL, than
> $TYPO3_CONF_VARS['FE']['pageNotFound_handling_statheader'] is ignored
> and client is redirected to error page using code 302. This is
> especially bad for search engines like Google because (1) they may not
> remove such pages from their index (2) sitemaps do not work properly.
> 
> Solution: use t3lib_div::getURL() to fetch error page internally and
> pass it to client with correct header. getURL() is extended to accept
> custom HTTP headers that we need to send to 404 page (referrer and user
> agent).
> 
> Patch was discussed earlier in this list, I need one more +1 for it.

The patch does not work. I've attached a new patch that fixes a couple of 
problems:

* spaces instead of tabs
* misplaced checks for file_get_contents()
* switched headers (Referer and User-agent)
* $content set in if-expression but used in else-clause *

I've added the CURLOPT_NOBODY check.

Masi

* Could well be that it works but such code is hard to read.
-------------- next part --------------
An embedded and charset-unspecified text was scrubbed...
Name: pageNotFoundHandler.diff
Url: http://lists.netfielders.de/pipermail/typo3-team-core/attachments/20060602/a29591bb/attachment.diff 


More information about the TYPO3-team-core mailing list