There is a known issue in PHP where if you have Location: in the header function, it always sends a response code of 302, even if you specify another response code. For example,
PHP Code:
header("http//mysite.com/page.html", 301)
will generate a 302 Temporary redirect. The correct code to use is
PHP Code:
header("HTTP/1.1 301 Moved Permanently");
header("http//mysite.com/page.html", 301);
I am not sure if this issue has been fixed in newer versions of PHP, but definitely something to check where you use header() to perform redirects.