Answer the question
In order to leave comments, you need to log in
How to remove a duplicate site address when generating a link if ssl is used?
Good day!
There was such a problem: the site address is duplicated when forming a link if ssl is used.
I get the link like this:
$url = JURI::root(). JRoute::_('index.php?option=com_virtuemart&view=productdetails&virtuemart_product_id=' . $product->virtuemart_product_id . '&virtuemart_category_id=' . $product->virtuemart_category_id, true);
$url = str_replace(array('//', 'http:/', '/administrator', '/index.php', '/component/vmtoxls'), array('/', 'http://', '', '', ''), $url);
Answer the question
In order to leave comments, you need to log in
what a glorious shit code))
add another line
then the devil will break his leg)
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question