301 + Additional code

They have: 13 posts

Joined: Jan 2007

Hi,

I wanna redirect an old domain to the new one, but I cannot find the way to do it with these 3 conditions:
- Friendly way for bots and users. -> HTTP 301 error
- Display additional information announcing the main domain has changed, in order users can update their bookmarks.
- Add statistics code before the redirection.

I have tried to set this PHP:

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

but this does not allow me to add additional information nor statistics script.

Any idea?

Thanks!!!

http://www.TICnovation.com :: Innovando en las Tecnologias de la Informacion y la Comunicacion
http://www.santako.com :: Santa Coloma de Gramenet
http://www.barcelonapolis.com :: Comming soon

pr0gr4mm3r's picture

He has: 1,502 posts

Joined: Sep 2006

Something like this would work...

<?php
    header
( "HTTP/1.1 301 Moved Permanently" );
?>

<html>
<head>
<meta http-equiv="refresh" content="5;url=http://www.newurl.com">
</head>
<body>

<h1>Page Has Moved</h1>

<p>This page has moved permanently.  Please <a href="http://www.newurl.com">click here</a> or wait to be redirected.</p>

</body>
</html>
'

They have: 13 posts

Joined: Jan 2007

Great! This is just what I was looking for Smiling

Thanks!!!

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.