You could try this way:
$itemid = 164;
$application = JFactory::getApplication();
$menu = $application->getMenu();
$item = $menu->getItem( $itemid );
$link = new JURI( $item->link );
$link->setVar( 'ItemId', $itemid );
echo JRoute::_( $quoteLink, true, -1 ); ?>
From JRoute documentation:
Routing URLs**
The JRoute::_
method translates the internal Joomla! URL to a custom URL. JRoute::_
has three parameters and its prototype is:
JRoute::_($url, $xhtml = true, $ssl = null);
Where:
$url is a string containing the absolute or relative internal Joomla! URL.
$xhtml is a boolean value that specifies whether or not the output should be in XHTML. This parameter is optional and if omitted defaults to true.
$ssl is an integer value that specifies whether the URI should be secure. It should be set to 1 to force the URI to be secure using the global secure site URI, 0 to leave it in the same state as when it was passed, and -1 to force the URI to be unsecure using the global unsecure site URI.
It's not obvious from this documentation, but using **$ssl = -1**
will force an insecure URI, something like http://joomlasite.com
Update for your comment:
Another option could be the following:
echo JUri::root() . trim( JRoute::_( $quoteLink ), '/' );
A little «hacky», but it does the work... ;)