Welcome to WebmasterWorld Guest from

Message Too Old, No Replies

301 redirect by php



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

5+ Year Member

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.

brotherhood of LAN

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

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

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)

5+ Year Member

Thank you for you support and for the good news

Featured Threads

Hot Threads This Week

Hot Threads This Month