Forum Moderators: coopster
I'm using the following code:
header("HTTP/1.1 301 Moved Permanently");
header("Location: [mysite.com...]
exit();
The header checker is returning this:
#1 Server Response: [mysite.com...]
HTTP Status Code: HTTP/1.0 302 Found
Connection: close
X-Powered-By: PHP/5.1.4
Location: [mysite.com...]
Is lightty causing the change to 302?
what happens is you pass the status, which you have correctly, then you send a location header and if you hadn't added a status before then it would default to a 302.
I would look at 2 things
the server header checker you used, make sure it is correct, though since you are having dupe issues it is probably right
make a small change to see if it makes any difference
header('HTTP/1.1 301 Moved Permanently');
change the double quotes to single quotes, the parser could be doing something funny and you definitely do not want that string parsed.
you need to look at that line because it looks like you are sending a malformed status header which is causing the second header to default to 302