Hard to tell from your example, but the HTTP/1.1 standard requires that a Location: directive be followed by a full URI, not a relative filename, as is explained in the PHP documentation.
Also, you should NOT end the line with a \n, as the standard calls for terminated by CRLF, not LF, and PHP will supply it automatically.
It may be that your inclusion of \n is causing the problem by prompting PHP to emit data after the redirect. It is a good practice to call exit() immediately after performing a redirect. Again, this is noted in the PHP documentation.