Jump to content
  • Checkout
  • Login
  • Get in touch

osCommerce

The e-commerce.

Remove & Prevent duplicate content with the canonical tag


spooks

Recommended Posts

Hello , i installed meta tag contribution and now i want to install this pack but i have one small question , you told in your instruction "

  • open the meta tag file in the catalog/includes folder (ie 'header_tags.php')

Add, at the very bottom, before the last ?>

" should i add to the files that they been added catalog / include / boxes & function and etc or just i add to the files that they been added in catalog / include ?

TKS

Link to comment
Share on other sites

Hello , i installed meta tag contribution and now i want to install this pack but i have one small question , you told in your instruction "

  • open the meta tag file in the catalog/includes folder (ie 'header_tags.php')

Add, at the very bottom, before the last ?>

 

" should i add to the files that they been added catalog / include / boxes & function and etc or just i add to the files that they been added in catalog / include ?

TKS

now i understand what to do , but this patch did not work correctly for me when you install meta tag seo it did not work .

Link to comment
Share on other sites

  • 1 month later...

Thank you for this very important function.

 

some other contribs remove /index.php from the url if in root.

So no duplicates www.abc.com - www.abc.com/index.php

 

If in this function, the switch $rem_index is set to true, it will remove index.php even if in category view, so we get the canonical www.abc.com/cpath/123 which makes no sense.

 

To make this work, set the switch

$rem_index = true;

AND change the line

	if ($rem_index) $search[] = ('/index.php\/*/');

to

	if (!preg_match("/cPath/", $request_uri) && $rem_index) $search[] = ('/index.php\/*/');

Edited by texmaxx
Link to comment
Share on other sites

  • 3 months later...

I currently have header tags for novices installed... and I'm looking to replace with this contri... I was going to do the 2 min test however wanted to check to see if someone could confirm (because I have header tags for novice installed) the code to replace in index.php and product_info.php

 

<title><?php echo $header_tags[title_tag]; ?></title>
<meta name="description" content="<?php echo $header_tags[desc_tag]; ?>">
<meta name="keywords" content="<?php echo $header_tags[keywords_tag]; ?>">

 

I presume I would replace the entire code with

 

<?php include_once DIR_WS_MODULES . 'kiss_meta_tags/kiss_meta_tags.php'; ?>

 

Thank you in advance.

Link to comment
Share on other sites

  • 1 month later...

@@Ken44

 

I`ll check that out, I`ve not reviewed this code for a long time, perhaps that's overdue. :unsure:

Sam

 

Remember, What you think I ment may not be what I thought I ment when I said it.

 

Contributions:

 

Auto Backup your Database, Easy way

 

Multi Images with Fancy Pop-ups, Easy way

 

Products in columns with multi buy etc etc

 

Disable any Category or Product, Easy way

 

Secure & Improve your account pages et al.

Link to comment
Share on other sites

  • 1 month later...

@@spooks

 

Im using seo urls and have installed your canonical tag url.

 

When I look at whos online, I can still see google and bing bot was at url like product_info.php?cPath=484_485&products_id=9696

 

I dont know how google and bing bot is finding that url since is should be something like product_info.php?pName=my_product

 

Its the same for index pages, they are finding index.php?cPath=475_478 instead of index.php?cPath=mycatname, and canonical tag for index.php?cPath=475_478 is not index.php?cPath=mycatname it is index.php?cPath=475_478, meaning the bots will think thats the correct url and keep indexing it?

Link to comment
Share on other sites

  • 5 years later...

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Unfortunately, your content contains terms that we do not allow. Please edit your content to remove the highlighted words below.
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

×
×
  • Create New...