I have checked lots of posts to try to know why header() doesn't worked when I uploaded my project to my hosting, because it was working when I was checking it on localhost.
Include error_reporting(E_ALL); in some part of your php code for see all errors.
Then I saw a error appeared: Warning: "Cannot modify header information - headers already sent by (output started at /homepages/6/d906792626/htdocs/app/Model.php:388) in /homepages/6/d906792626/htdocs/app/Controller.php on line 63"
Then the last thing I did was creating php.ini and writting this line: output_buffering = On
Then it started working.
PD: I have considered to do this post because I have been 4 hours trying to figure out what was going bad.