List Info

Thread: note 78088 added to function.header




note 78088 added to function.header
user name
2007-09-27 03:10:48
Be aware, when using the php Header function to redirect 
from one domain to another, search engines will a (perhaps
damaging) 302 temporarily redirect status code.

I believe it would be better to make use of 301 Permanently
redirects in those cases you won't need to go back to an old
domain or any other old URLs.

/* Bad way or only for temporarily redirects */
header("Location: http://www.venelogia.
com/");

/* Good and permanent redirect */
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.venelogia.
com/");
exit();

As a side note, after I decided to move permanently to a new
domain I started (in my ingenuity) using a normal PHP
redirect from one domain to another but this caused many
indexing problems. So... Avoid using simple (and common) 302
PHP redirects unless you really need to get back to certain
URLs.

Regards,
Mel
----
Server IP: 69.147.83.197
Probable Submitter: 190.37.129.117
----
Manual Page -- http
://www.php.net/manual/en/function.header.php
Edit        -- https://master
.php.net/note/edit/78088
Del: integrated  -- h
ttps://master.php.net/note/delete/78088/integrated
Del: useless     -- http
s://master.php.net/note/delete/78088/useless
Del: bad code    -- htt
ps://master.php.net/note/delete/78088/bad+code
Del: spam        -- https:/
/master.php.net/note/delete/78088/spam
Del: non-english -- 
https://master.php.net/note/delete/78088/non-english
Del: in docs     -- http
s://master.php.net/note/delete/78088/in+docs
Del: other reasons-- https://mast
er.php.net/note/delete/78088
Reject      -- https://mast
er.php.net/note/reject/78088
Search      -- https://
master.php.net/manage/user-notes.php

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


note 78088 deleted from function.header by nlopess
user name
2007-09-27 17:42:10
Note Submitter: mdnava at gmail dot com 

----

Be aware, when using the php Header function to redirect 
from one domain to another, search engines will a (perhaps
damaging) 302 temporarily redirect status code.

I believe it would be better to make use of 301 Permanently
redirects in those cases you won't need to go back to an old
domain or any other old URLs.

/* Bad way or only for temporarily redirects */
header("Location: http://www.venelogia.
com/");

/* Good and permanent redirect */
header("HTTP/1.1 301 Moved Permanently");
header("Location: http://www.venelogia.
com/");
exit();

As a side note, after I decided to move permanently to a new
domain I started (in my ingenuity) using a normal PHP
redirect from one domain to another but this caused many
indexing problems. So... Avoid using simple (and common) 302
PHP redirects unless you really need to get back to certain
URLs.

Regards,
Mel

-- 
PHP Notes Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub
.php


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )