Welcome to WebmasterWorld Guest from 54.146.201.80

Message Too Old, No Replies

301 redirect by php

     
4:17 pm on Jan 22, 2014 (gmt 0)

Full Member

5+ Year Member

joined:Jan 14, 2009
posts: 279
votes: 2


I am changing the layout of a website born in 2005. I have html and php pages that I have to redirect.
I am writing the follow php code:
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.example.com/new-page/" );
?>

I am not able to edit .htaccess, so I wonder if (from a Google point of view) a php redirect by php is accepted.
My doubt is that Google help does not mention any php redirect, but only .htaccess.
4:56 pm on Jan 22, 2014 (gmt 0)

Moderator This Forum from GB 

WebmasterWorld Administrator brotherhood_of_lan is a WebmasterWorld Top Contributor of All Time 10+ Year Member Top Contributors Of The Month

joined:Jan 30, 2002
posts:4842
votes: 1


It doesn't make a difference what serve side technology you use, Google will only see the end result. In other words, using PHP to generate a 301 response and redirect is fine.
5:03 pm on Jan 22, 2014 (gmt 0)

Full Member

5+ Year Member

joined:Jan 14, 2009
posts: 279
votes: 2


Thank you for you support and for the good news