Is this a bug? Looks like this shouldn't be this way:
JURI ( uri.php), lines 232-235:
if(trim($live_site) != '') {
$uri =& JURI::getInstance($live_site);
$base['prefix'] = $uri->toString( array('scheme', 'host', 'port'));
$base['path'] = rtrim($uri->toString( array('path')), '/\\');
In case $live_site is supplied, there is no path in it, so $base['path'] gets an empty string.
last line (253) of this method:
return $pathonly === false ? $base['prefix'].$base['path'].'/' : $base['path'];
as the method is called from render() like base(true), it returns $base['path'], which is empty.
So, JDocumentHTML::render's call to
$this->baseurl = JURI::base(true); sets baseurl property to an empty string if $live_site is set.
I couldn't trace it further to find how does the Document's base property gets assigned that wrong value?
However, I found a quick workaround, no hacks, the code goes to the start of the template's index.php:
Hope this helps someone.