You are here:  » No Follow


No Follow

Submitted by JasonG on Tue, 2013-12-03 10:21 in

Hi David

Hope you are well.

I was wondering if you could help, if we wanted to put a "No Follow" on all product pages: {link saved} would this be possible?

We need to make sure that category pages are still found: {link saved}

Thanks
Stuart

Submitted by support on Tue, 2013-12-03 10:47

Hi Stuart,

To add rel='nofollow' to Buy URL links, looks for the following code beginning at line 96 in includes/tapestry.php

    if ($config_useTracking)
    {
      return $config_baseHREF."jump.php?id=".$product["id"];
    }
    else
    {
      return $product["buy_url"];
    }

...and REPLACE with:

    if ($config_useTracking)
    {
      $retval = $config_baseHREF."jump.php?id=".$product["id"];
    }
    else
    {
      $retval = $product["buy_url"];
    }
    return $retval."' rel='nofollow";

Alternatively, if it was the internal links to your own product pages that you wanted to make no follow then very similarly, also in includes/tapestry.php look for the following code beginning at line 51:

    if ($config_useRewrite)
    {
      return $config_baseHREF.urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
    }
    else
    {
      return $config_baseHREF."products.php?q=".urlencode($product["normalised_name"]);
    }

(note: the above is modified in accordance with your existing modification to remove "product/" from the product page URLs)

...and REPLACE with:

    if ($config_useRewrite)
    {
      $retval = $config_baseHREF.urlencode(tapestry_hyphenate($product["normalised_name"])).".html";
    }
    else
    {
      $retval = $config_baseHREF."products.php?q=".urlencode($product["normalised_name"]);
    }
    return $retval."' rel='nofollow";

Cheers,
David.
--
PriceTapestry.com