Sam's Remove & Prevent duplicate content with the canonical tag V1.3.2


This script will dynamically read the query string calling the page, remove any parameters that have/may cause duplicate content issues with search engines and generate a canonical tag with the modified query string. The search engines will effectively interpret this as a 301 redirect, there will be no effect on the page or url for your visitors.

If you have an existing install of a meta tag contribution, the install only requires the addition of a single line of code and one added function.


Purpose


If Google etc. can find multiple paths to a single product its likely that the url for that page will vary according to the path taken, that will mean the search engines will consider it a separate page, but as its the same as another with a different url your site will be penalized for having duplicate content.

This situation arises in osC due to paging, sorting, multiple currencies & maybe even multiple languages. Also if you have any links to your site with the osCsid attached you have the same problem & other issues, you should enable Prevent Spider Sessions and update spiders.txt.

This add-on prevents the problem and removes it if it exists by adding a new tag into you page <head> section called a canonical, the search engines see this & will use that in preference to the pages actual url. This removes any parameters from the query string appearing in that link that have been defined as creating the issue.


Version History

Version 1.0

Version 1.1

Version 1.2

Version 1.3

Version 1.3.1

Version 1.3.2

Support, questions - issues - etc


Please post any queries or issues in the support thread found here.

Installation


Please read through all the instructions first & make sure you understand them, if your unsure about anything please read the tips given here.

If you have any errors or problems following your install please also read the tips given here before you rush to post your problem. .


Step 1 - BACKUP

Make backups of all files that may be effected:

    If you don't have any meta tag contributions installed, these will be:

    • All files in your catalog folder.
    • catalog/includes/functions/html_output.php

    If you do have a meta tag contribution installed:

    • Your meta tag include file.
    • catalog/includes/functions/html_output.php

Step 2a - If you don't have any meta tag contributions installed
  • open each file in your catalog folder

Add in the section at the bottom of the meta tags:

<?php CanonicalLink( $xhtml = false, 'SSL' ) ?>


Step 2b - If you do have a meta tag contribution installed
  • open the meta tag file in the catalog/includes folder (ie 'header_tags.php')

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

CanonicalLink( $xhtml = false, 'SSL' );


Step 3 - Add the function

In catalog/includes/functions/html_output.php

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


Step 4 - Saving

Save all changed files and upload to your site.




That's it, your done!


Usage


If you use a xhtml doctype change the $xhtml = false parameter to $xhtml = true, that will mean the closing tag will be /> instead of >.

If you have no 'catalog' pages on a secure server (ie only account etc. pages are there) set the 'SSL' parameter to 'NONSSL', then if anyone has linked any catalog pages as https in error, the search engines will still index as non-ssl, so no duplicate. Account etc. pages will not receive a tag as they should not be index-able, ie blocked by your 'robots.txt'.

If you wish to increase or change the removed param's, edit the line:
$remove_array = array( 'currency','language','main_page','page','sort','ref','affiliate_banner_id','max'); You must ensure you keep to the existing format, ie ,'my tag'

To remove page specific params add to the $page_remove_array, should be in same format as previous, given is manufacturers_id & cPath will be be removed for product_info.php only and no specific removals for index.php.

Its possible the you will get a duplicate content issue with my-domain.com & my-domain.com/index.php as these are one & the same page, you can use .htacces to deal with this:
RewriteCond %{THE_REQUEST} !^POST 
RewriteCond %{THE_REQUEST} ^[A-Z]{3,9}\ /(.*)index\.php(.*)\ HTTPS/ [NC]
RewriteRule ^index\.php(.*)$ http:\/\/pivht-supplements.com/$1 [R=301,L]
That is normally sufficient, however on some servers there can still be an issue, if so enable removal of index.php from the uri by setting $rem_index to true in the code.

If you have any errors or problems following your install please also read the tips given here before you rush to post your problem. .



-----

Tested on PHP 4 & 5, SQL 4 & 5, osC 2.2 ms2, rc1 & rc2a and is register_globals off compatible.


Note: you will not see anything change on the page, the tag goes in the page head section, so only the search engines see it, you will need to view your pages generated source to see it.


Support thread will be found here.

  

New Products

Result Pages: [<< Prev]  ... 26  27  28  29  30 ...  [Next >>]  Displaying 521 to 540 (of 2744 new products)

Hepatica Bitter Melon 180 caps. Hepatica Bitter Melon 180 caps.
Date Added: Thursday 14 July, 2022
Manufacturer: Hepatica

Price: TRY ₺ 412 TRY ₺ 259
Hepatica Shatavari 90 caps. Hepatica Shatavari 90 caps.
Date Added: Thursday 14 July, 2022
Manufacturer: Hepatica

Price: TRY ₺ 365
Hepatica Pau d'Arco 90 caps. Hepatica Pau d'Arco 90 caps.
Date Added: Thursday 14 July, 2022
Manufacturer: Hepatica

Price: TRY ₺ 377
Hepatica Reishi 90 caps. Hepatica Reishi 90 caps.
Date Added: Thursday 14 July, 2022
Manufacturer: Hepatica

Price: TRY ₺ 377
Hepatica Boswellia AKBA-30 90 caps. Hepatica Boswellia AKBA-30 90 caps.
Date Added: Thursday 14 July, 2022
Manufacturer: Hepatica

Price: TRY ₺ 529 TRY ₺ 365
Hepatica Quercetin 120 caps. Hepatica Quercetin 120 caps.
Date Added: Thursday 14 July, 2022
Manufacturer: Hepatica

Price: TRY ₺ 706 TRY ₺ 565
UNS Hepavit 60 caps. UNS Hepavit 60 caps.
Date Added: Wednesday 06 July, 2022
Manufacturer: UNS

Price: TRY ₺ 812 TRY ₺ 694
UNS Methylcobalamin B12 90 vcaps. UNS Methylcobalamin B12 90 vcaps.
Date Added: Wednesday 06 July, 2022
Manufacturer: UNS

Price: TRY ₺ 812 TRY ₺ 694
UNS Trans Reveratrol Veri-Te 60 vcaps. UNS Trans Reveratrol Veri-Te 60 vcaps.
Date Added: Wednesday 06 July, 2022
Manufacturer: UNS

Price: TRY ₺ 1518 TRY ₺ 1353
UNS Diabetovit 60 caps. UNS Diabetovit 60 caps.
Date Added: Wednesday 06 July, 2022
Manufacturer: UNS

Price: TRY ₺ 930 TRY ₺ 824
UNS Slimvit 60 caps. UNS Slimvit 60 caps.
Date Added: Wednesday 06 July, 2022
Manufacturer: UNS

Price: TRY ₺ 1400 TRY ₺ 1283
ActivLab Lipid Support 60 vcaps. ActivLab Lipid Support 60 vcaps.
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 647
ActivLab Magnesium Taurate with P-5-P 60 caps. ActivLab Magnesium Taurate with P-5-P 60 caps.
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 529
ActivLab Alcar 90 caps. ActivLab Alcar 90 caps.
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 518
ActivLab KreoActiv Plus  50 caps. ActivLab KreoActiv Plus 50 caps.
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 271
ActivLab Flex Complete 400g ActivLab Flex Complete 400g
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 647
ActivLab Hair Special Plus 60 tablets ActivLab Hair Special Plus 60 tablets
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 235
ActivLab MultiVit Senior 60 tablets ActivLab MultiVit Senior 60 tablets
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 235
ActivLab WPC80 Lactose Free 700g ActivLab WPC80 Lactose Free 700g
Date Added: Wednesday 22 June, 2022
Manufacturer: Activlab

Price: TRY ₺ 1130 TRY ₺ 941
Core Labs (Revange) Yohimbine HCL 5mg 100 caps. exp date 07/2024 LAST 2 Core Labs (Revange) Yohimbine HCL 5mg 100 caps. exp date 07/2024 LAST 2
Date Added: Friday 17 June, 2022
Manufacturer: Revange (Core Labs)

Price: TRY ₺ 1165 TRY ₺ 459

Result Pages: [<< Prev]  ... 26  27  28  29  30 ...  [Next >>]  Displaying 521 to 540 (of 2744 new products)
Quick Find
 
Use keywords to find the product you are looking for.
Advanced Search
Manufacturers
0 items
Currencies
USD
EUR
GBP
CHF
AUD
CAD
CZK
HUF
DKK
JPY
NOK
SEK
UAH
CNY
BGN
SGD
TRY
ZAR
FJD
NPR
NZD
RON
HKD
MXN
ILS
INR
THB
TWD
PHP
MYR
BRL
LVL
LTL

pivht-supplements.com payments methods

Copyright © 2010-2025 pivht-supplements.com Wholesale prices and kits !
Powered by osCommerce