Been having a rather curious bug on WordPress installations on IIS such that for the front page, the previous post link to the second page keeps showing “index.phpIndex.php” instead of forming the correct url path.
Finally fixed this by modifying the code at “/wp-includes/link-template.php”
function get_pagenum_link($pagenum = 1) {
...
// insert before return $qstr
$qstr = str_replace("index.phpIndex.php","index.php",$qstr);
return $qstr;
}