K
K
KoRNeT46RuS2016-02-02 12:05:27
Zend Framework
KoRNeT46RuS, 2016-02-02 12:05:27

[ZF2] 404 page instead of status code 404 shows 200?

Forced $response->setStatusCode(404); Does not help. In the developer panel and Yandex bot shows 200. Advise

Answer the question

In order to leave comments, you need to log in

2 answer(s)
D
Dmitry, 2016-02-02
@DP-Studio

Try calling return $this->notFoundAction();

A
Andrey Mokhov, 2016-02-02
@mokhovcom

and what kind of response do you return?
need something like this:

...
return $response->setStatusCode(404);
...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question