[TYPO3-english] Custom 404 with 404 header and CoolURI?

Christopher Torgalson bedlamhotel at gmail.com
Wed Oct 27 23:29:24 CEST 2010


Hi,

On Wed, Oct 27, 2010 at 2:06 PM, Axel Joensson <a.joensson at web.de> wrote:
> Hello,
>
> is it possible to set up a custom "error 404" page with CoolURI
> installed, that does send a correct 404 header instead of 302 or
> something like that?
>
> Does disabling CoolURI for that page and defining it in the Inatall Tool
> do the job?
>
> Or is there any other valid way to send a correct 404 header with a
> custom page, showing e.g. the regular site menu, with CoolURI working on
> the rest of the site?


There is no possible reason for a 404 page to need a custom URL since
it is *never* accessed via it's own URL (what would be the point?)

You can use a TYPO3 page as a 404 page (including correct 404 header) like this:

* Create a page and note its id
* In the install tool or in localconf.php directly, set
[pageNotFound_handling_statheader] to HTTP/1.0 404 Not Found (this is
the default I think)
* In the install tool or in localconf.php, set [pageNotFound_handling]
to /index.php?id=123 (replace '123' with the id of your page of
course...)

Note that there are several other configuration options for
[pageNotFound_handling] that you can read about in the install tool.

-- 
Christopher Torgalson
http://www.typo3apprentice.com/


More information about the TYPO3-english mailing list