I have a problem doing a permanent redirect. It works only if I
directly send the new location header (third line in sample below) but
never in combination with sending a "301 Moved permanently" first
(second line below). Unfortunately my server is shielding error
messages from me (and I don't have access to the PHP.INI).
------- Sample -------
<?
header("HTTP/1.1 301 Moved permanently");
header("Locatio n: http://www.example.com ");
?>
----------------------
(Note: there is no space anywhere or anything else before I send the
header. Also: I cannot send the "Moved permanently" on its own either.
It always breaks my script, but I don't know why.)
What can I do? If I redirect without 301 I'm afraid Google won't change
it's index of my pages.
Any help greatly appreciated!
directly send the new location header (third line in sample below) but
never in combination with sending a "301 Moved permanently" first
(second line below). Unfortunately my server is shielding error
messages from me (and I don't have access to the PHP.INI).
------- Sample -------
<?
header("HTTP/1.1 301 Moved permanently");
header("Locatio n: http://www.example.com ");
?>
----------------------
(Note: there is no space anywhere or anything else before I send the
header. Also: I cannot send the "Moved permanently" on its own either.
It always breaks my script, but I don't know why.)
What can I do? If I redirect without 301 I'm afraid Google won't change
it's index of my pages.
Any help greatly appreciated!
Comment