Wordpress in root, OpenCart in /store sub-directory
Like so,
Code: Select all
http://mydomain.com
Code: Select all
http://mydomain.com/store
Information pages have separate and the same copy available for both OpenCart and Wordpress.
So the About Us Page [...to be SEO Optimized] is accessible by;
Code: Select all
http://mydomain.com/about-us
Code: Select all
http://mydomain.com/store/about-us
Now... I want http://mydomain.com/about-us to be the canonical link.
So I want to put the
Code: Select all
rel="canonical"
Code: Select all
http://mydomain.com/store/about-us
and put this code...
Code: Select all
$this->document->addLink($this->url->link('information/information', 'information_id=' . $this->request->get['information_id']), 'canonical');
I don't have php knowledge but I am willing to follow any guide or instructions.
I am wanting to accomplish this because I think Google will take my About Us page as Duplicate Contents. But they really are duplicates.
UPDATE:
I am also trying this to work, with no success.
UPDATE:
If my duplicate About Us page does not have any SEO Negative Impact, then I don't require this anymore. Or I will just have to block the other About Us page to not to be indexed by Search Engines.
UPDATE
I've successfully added the canonical link, but need some modification.
I need to strip out route and just get the information id, need further help please.
This above code is working and place it in another line like below,
Code: Select all
$this->data['heading_title'] = $information_info['title'];
$this->document->addLink($this->url->link('information/information', 'information_id=' . $information_id), 'canonical');
Code: Select all
<link href="http://mydomain/about-us" rel="canonical" />