Hi. It seems that there may be a mislink somewhere in the new PHP code, maybe dealing with the $_SERVER['PHP_SELF'] variable. What do you get onscreen when you try the following?
In robot_functions.php right after:
PHP Code:
//print $answer."<br>\n";
stick the following:
PHP Code:
echo "Page: ".$host.$path."<br>\n";
and see what pages are generating the 404s on index.