MissingControllerException is being responsed as 200 OK intead of 404 Not Found

Hi there!

I’ve recently migrated my project to another server (hostinguer => aws) and i am forcing a MissingControllerException and i’m getting the response as 200 Ok with a error object as body.

On my old server same scenario return 404 Not Found and parse it with missing_controller.ctp default view

GET /uu HTTP/1.1
Host: my-cakephp-app.com
Connection: keep-alive
Pragma: no-cache
Cache-Control: no-cache
Upgrade-Insecure-Requests: 1
User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_1) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.110 Safari/537.36
Accept: text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,image/apng,/;q=0.8
Accept-Encoding: gzip, deflate
Accept-Language: es-ES,es;q=0.9,en;q=0.8,gl;q=0.7,fr;q=0.6
Cookie: CAKEPHP=7ic2m6asdsad40sh4n9529c90t6ga91

HTTP/1.1 200 OK
Date: Sat, 15 Dec 2018 21:32:22 GMT
Server: Apache/2.4.34 (Amazon) PHP/5.4.45
X-Powered-By: PHP/5.4.45
Keep-Alive: timeout=5, max=100
Connection: Keep-Alive
Transfer-Encoding: chunked
Content-Type: text/html; charset=utf-8

Response Body
object(MissingControllerException)#31 (10) {
string(39) “Controller class %s could not be found.”
array(2) {
string(12) “UuController”
string(49) “Controller class UuController could not be found.”
string(0) “”


Config/core.php and .httpaccess files are the same in both of servers.

Someone of you guys know what i am missing?

Thanks in advance!