Handle URLs starting with index.php correctly

If the URL "index.php" was given, it was converted into "http://http://&lt;servername&gt;/index.php", and an URL starting with "index.php" (e.g. "index.php/sample-sites") was converted into (in this example) "http://index.php/sample-sites". Now "index.php" and e.g. "index.php/sample-sites" are treated identically, they are converted into "http://&lt;servername&gt;/index.php" resp. "http://&lt;servername&gt;/index.php/sample-sites".
It was JURI before, and I didn't change this line - I think JUri shall be used in 3.x?

Moreover I scanned the 2.5.x sources and I found some places where JUri is used but I didn't find the definition of the JUri class, only a definition of the JURI class which I think is not the same.