0

I'm having canonical issues with my website. When I visit the homepage, I see http//www.vincousa.com/?productsublayout=0 as the URL in my address bar. I would like http://www.vincousa.com as the URL.

I'm using VirtueMart 3.0.9 with Joomla version 3.4.3.

2
  • 5
    Please update to Joomla 3.4.5 immediately. By providing your URL, your site is prone to being hacked within 10 minutes.
    – Lodder
    Commented Nov 19, 2015 at 9:48
  • What SEF components are you using?
    – TryHarder
    Commented Nov 20, 2015 at 3:03

2 Answers 2

1

Add this to your templates index.php file before the closing body tag:

$JInput = JFactory::getApplication()->input;
$itemid = $JInput->get('Itemid','','int');
if($itemid == 'YOUR NUMERIC HOME PAGE ITEMID'){
    $doc = JFactory::getDocument();
    $doc->addHeadLink(JUri::root(),'canonical');
}

that will reset your canonical link on your homepage to be the URL of you site.

-1

Just clear your browser cache, no need to edit your PHP files. And conical is best set in .htaccess file you know how that works yes?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.