404 Redirect Problem and Query

0 replies
I recently took over an expired domain and I want to make use of any traffic and link juice coming from links to internal pages that no longer exist. Following some advice I created an error.php page and added some script to my .htaccess file (ErrorDocument 404 /error.php), but it doesn't seem to work.

The script on my error.php page is:

<?php
header("HTTP/1.1 301 Moved Permanently");
header("Location: ^web address here");
exit();
?>

I am wondering what I am doing wrong, and whether this system is actually the best way to preserve any pagerank benefit anyway.

Hooping someone can advise,

Thanks
#404 #problem #query #redirect

Trending Topics