if (!($_SERVER['SCRIPT_NAME'] == $_SERVER['REQUEST_URI'])) { header("location: " . $_SERVER['SCRIPT_NAME']); } ?>
Test page
this should redirect back to itself if addressed by a path with too many //s in.