Jump to content
Sign in to follow this  
spooks

Remove & Prevent duplicate content with the canonical tag

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

Share this post


Link to post
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 .

Share this post


Link to post
Share on other sites

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

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

@@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.

Share this post


Link to post
Share on other sites

Hi Sam

 

Please disregard my last post. I tried the code on the server and it works fine.

It must be a problem with xampp only.

 

Regards.

 

Ken

Share this post


Link to post
Share on other sites

@@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?

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×