Forum Moderators: open
Though: when checking the domains that refer to my sites inktomi.com pops up like crazy hitting pages that do not exist, everything lands on my customized 404 page which is better than not having one because it converts a little too.
Anyone with same results out there? What could it be? Old index not finding pages that have been removed?
Thanks, Jens
You might want to try this php I use which can potentially catch every 404 from old links.
Obviously you can get them from your 404 logs but also potentially from the search engines. For example, if you search Google site:www.widget.com -qnonsense + include all pages it may show up some old links which don't have description or title just old URL's. Don't know about how you might do this in Ink.
(I'm pasting this in .. beware if the forum changes spacing etc..)
on top of your 404
<?php
$request = $_SERVER['REQUEST_URI'];
include('error-404-config.php');
if ( $request!= '' ) {
$x=0;
while ($x!= $count)
{ if ( $request == $choice[$x] )
{ $redirect = $target[$x];
header("HTTP/1.1 301 Moved Permanently");
header("Location: " . $domain . $redirect );
exit;
}
$x++;
}
}
?>
file error-404-config.php
<?php
$domain = 'http://www.widget.com/';
$count = '2';
$choice[0] = '/doh.html';
$choice[1] = '/nofound.html';
$choice[2] = '';
$choice[3] = '';
$choice[4] = '';
$choice[5] = '';
$target[0] = 'found.html';
$target[1] = 'itdoesexisit/here.html';
$target[2] = '';
$target[3] = '';
$target[4] = '';
$target[5] = '';
?>
dpb