quick question regarding Redirecting a PHP File

Status
Not open for further replies.
Jul 30, 2006
377
4
0
Houston, TX
www.boxgraphic.com
is this a right way (by right way I mean SEO Friendly way) to redirect a PHP page to another page on my site?
here is the PHP source code:
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled 1</title>
</head>

<body>
<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.acentralhouston.com/gallery/" );
?>
</body>

</html>
 


No.... use only

<?php
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.acentralhouston.com/gallery/" );
?>


if the browser renders anything else. i.e. the <!DOCTYPE html PUBLIC... it will send a header.. and cant sent another header later on.
 
the redirect itself should still work, but going with what edgee said Header( "HTTP/1.1 301 Moved Permanently" ); will be disregarded
 
Status
Not open for further replies.