note 78088 deleted from function.header by nlopess

From: Date: Thu, 27 Sep 2007 22:42:10 +0000
Subject: note 78088 deleted from function.header by nlopess
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-130868@lists.php.net to get a copy of this message
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

« previous php.notes (#130868) next »