This site has been archived. To learn more about our current products Ibexa Content, Ibexa Experience, Ibexa Commerce head over to the Ibexa Developer Portal

eZ Community » Forums » Developer » Making a 404 page return ststus 404

Making a 404 page return ststus 404

Making a 404 page return ststus 404

Wednesday 26 March 2014 10:49:27 am - 4 replies


 I am trying to make my 404 page return actually 404  rather than 200.

in error.ini I have (amongst other things):

HTTPName=Not Found

What I get in the response (amongst other things) is:

 HTTP/1.1 200 OK
Status: 404 Not Found
status: 404 Not Found

So, I get the correct 'status' header twice, once with capital "S" and once with lowercase "s" but the status line (which is the one that matters) reports "200 OK".

Any pointers ?


Modified on Wednesday 26 March 2014 2:53:17 pm by Francesco Nardone

Thursday 27 March 2014 1:43:26 pm

eZ returns a 404 on page/content not found by default.

It might be better to modify the template.

You can create a template under yourdesign/templates/error/kernel/20.tpl with the text you would like to display.

Thursday 27 March 2014 1:52:31 pm

Thank you Betsy.

My problem is not with the text in the response body, but with the response header.

In my case it returns "200 OK" in the status line and two header fields "Status" and "status" with 400.

I would like to have the HTTP status line to return 400. This is an old installation I inherited and ported to 5.1. So there may well be somewhere a setting that makes it behave the way it does but I cannot find it.

Thursday 27 March 2014 3:55:07 pm

It might be good to try commenting out the settings you posted in this thread to see what happens.

You should get the 'Module not found page' with a 404.

I tested this with eZ 5.

Thursday 27 March 2014 6:53:31 pm

You should post some details about your install. I've just checked several of our installs and it always return HTTP 404:

HTTP request sent, awaiting response...
  HTTP/1.1 404 Not Found

Checked on eZP 4.x and Community 2013.9 (legacy mode)


You must be logged in to post messages in this topic!

36 542 Users on board!

Forums menu

Proudly Developed with from