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 561 to 580 (of 2744 new products)

Revange Miami Lean 60 caps. exp date 12/2024 SALE! Revange Miami Lean 60 caps. exp date 12/2024 SALE!
Date Added: Saturday 28 May, 2022
Manufacturer: Revange (Core Labs)

Price: NPR रु 6929 NPR रु 5289
Core Labs (Revange) Pump Force 180 caps. [2 boxes x90 caps.] exp date 2026 Core Labs (Revange) Pump Force 180 caps. [2 boxes x90 caps.] exp date 2026
Date Added: Saturday 28 May, 2022
Manufacturer: Revange (Core Labs)

Price: NPR रु 8938 NPR रु 6888
Revange Piracetam 2500g [5 boxes x500g] exp date 12/2026 Revange Piracetam 2500g [5 boxes x500g] exp date 12/2026
Date Added: Saturday 28 May, 2022
Manufacturer: Revange (Core Labs)

Price: NPR रु 42845 NPR रु 26855
Revange Piracetam 1000g [2 boxes x500g] exp date 12/2026 Revange Piracetam 1000g [2 boxes x500g] exp date 12/2026
Date Added: Saturday 28 May, 2022
Manufacturer: Revange (Core Labs)

Price: NPR रु 17138 NPR रु 12218
Hepatica Czystek kreteński (cistus creticus) 90 caps. Hepatica Czystek kreteński (cistus creticus) 90 caps.
Date Added: Thursday 26 May, 2022
Manufacturer: Hepatica

Price: NPR रु 1927 NPR रु 1066
Hepatica Aloe Vera 60 caps. Hepatica Aloe Vera 60 caps.
Date Added: Thursday 26 May, 2022
Manufacturer: Hepatica

Price: NPR रु 1230 NPR रु 697
Hepatica Tulsi 90 caps. Hepatica Tulsi 90 caps.
Date Added: Thursday 26 May, 2022
Manufacturer: Hepatica

Price: NPR रु 1189
Hepatica Bamboo Extract 120 caps. Hepatica Bamboo Extract 120 caps.
Date Added: Thursday 26 May, 2022
Manufacturer: Hepatica

Price: NPR रु 1107
Hepatica Immune Formula 120 caps. Hepatica Immune Formula 120 caps.
Date Added: Thursday 26 May, 2022
Manufacturer: Hepatica

Price: NPR रु 2091
Hepatica Lactoferrin Forte 60 caps. Hepatica Lactoferrin Forte 60 caps.
Date Added: Thursday 26 May, 2022
Manufacturer: Hepatica

Price: NPR रु 3977
7Nutrition Coenzyme Q10 Ubichinon 60 caps. 7Nutrition Coenzyme Q10 Ubichinon 60 caps.
Date Added: Monday 23 May, 2022
Manufacturer: 7Nutrition

Price: NPR रु 2829
Real Pharm Max Mag + B6 90 tablets Real Pharm Max Mag + B6 90 tablets
Date Added: Monday 23 May, 2022
Manufacturer: Real Pharm

Price: NPR रु 779
Real Pharm Red Speed Powder 400g Real Pharm Red Speed Powder 400g
Date Added: Monday 23 May, 2022
Manufacturer: Real Pharm

Price: NPR रु 2009
Activlab DebuActiv 60 caps. Activlab DebuActiv 60 caps.
Date Added: Monday 23 May, 2022
Manufacturer: Activlab

Price: NPR रु 1107
Haya Labs Taurine 500mg 100 caps. Haya Labs Taurine 500mg 100 caps.
Date Added: Monday 23 May, 2022
Manufacturer: Haya Labs

Price: NPR रु 1189
Real Pharm Biotin 60 tablets Real Pharm Biotin 60 tablets
Date Added: Monday 23 May, 2022
Manufacturer: Real Pharm

Price: NPR रु 820
Real Pharm Real Isolate 100 700g Real Pharm Real Isolate 100 700g
Date Added: Monday 23 May, 2022
Manufacturer: Real Pharm

Price: NPR रु 3198
Real Pharm ISO Go 600g Real Pharm ISO Go 600g
Date Added: Monday 23 May, 2022
Manufacturer: Real Pharm

Price: NPR रु 1025
Real Pharm Panax Ginseng 90 caps. Real Pharm Panax Ginseng 90 caps.
Date Added: Monday 23 May, 2022
Manufacturer: Real Pharm

Price: NPR रु 1025
Revange Liver3 (liver 3) 180 caps. [2 boxes x90 caps.] exp date 11/2024 Revange Liver3 (liver 3) 180 caps. [2 boxes x90 caps.] exp date 11/2024
Date Added: Saturday 21 May, 2022
Manufacturer: Revange (Core Labs)

Price: NPR रु 12218 NPR रु 8118

Result Pages: [<< Prev]  ... 26  27  28  29  30 ...  [Next >>]  Displaying 561 to 580 (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