hello, with subdomains we don't need noindex and nofollow

just add to noindex_external_links.module line 203
// subdomain links
$internalurl = "domain.com";
if (strpos($url['host'], $internalurl) > 0) return $match[0];

resulting code

/**
 * Do the magic with links
 *
 * @param string $input
 * @return boolean

 */
function noindex_external_links_replace($match) {
  global $_noindex_external_links_allowed_domains;
  global $_noindex_external_links_denied_domains;
  global $_noindex_external_links_method;

  $url = parse_url($match[2]);
  if ($url['host'] == $_SERVER['HTTP_HOST'])  return $match[0]; //Inner Link
  // subdomain links
  $internalurl = "domain.com";
  if (strpos($url['host'], $internalurl) > 0)  return $match[0]; 
..................
 

if intrested in this feature we can add special field in module ui for input domains, wich will be like subdomains

Comments

SimonLitt’s picture

Version: 6.x-1.x-dev » 7.x-2.x-dev
Assigned: Unassigned » SimonLitt
Status: Active » Needs review
SimonLitt’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

Automatically closed -- issue fixed for 2 weeks with no activity.