Forum Moderators: phranque

Message Too Old, No Replies

301 redirect question

         

seamus

7:51 pm on Jan 24, 2007 (gmt 0)

10+ Year Member



I’m moving my site from irishwidget.com to widget.ie

I’m using this

 
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: http://www.widget.ie" );
?>

If I put the code into my header and it appears on (irishwidget.com/test.htm) should it be able to locate the same page (widget.ie/test.htm) on the new domain.

It just seems to redirect to widget.ie

Am I doing something wrong? Any help appreciated.

Strange

8:26 pm on Jan 24, 2007 (gmt 0)

10+ Year Member



It won't go to /test.htm because the code is redirecting to [widget.ie....] Try
<?
Header( "HTTP/1.1 301 Moved Permanently" );
Header( "Location: [widget.ie...] );
?>

seamus

11:42 pm on Jan 24, 2007 (gmt 0)

10+ Year Member



Thanks Strange for your reply. What I want to know is will it hurt if all the pages on irishwidget.com redirect to the homepage of widget.ie?

Is this the best way to move to a new domain and retain my google trafic?