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".
Please consider `JUri` here.