I use this great module here http://www.zori.ro/reclame/top-reclame-tv-interzise-partea-1
In header I have
<link rel="canonical" href="http://www.zori.ro/reclame/top-reclame-tv-interzise-partea-1" />
and shouldn't be on this page, canonical should be use only on pages like
http://www.zori.ro/reclame/top-reclame-tv-interzise-partea-1?cck_pager_f...

Comments

idflorin’s picture

This could be a solution:
step 1. remove
drupal_set_html_head('<link rel="canonical" href="'. $canonical_url .'" />');
step 2. add:

	  $originalurl = $base_url . request_uri();
	  if ($canonical_url != $originalurl) {
      drupal_set_html_head('<link rel="canonical" href="'. $canonical_url .'" />');
	  }
peximo’s picture

Status: Active » Needs review

The last dev should fix the problem: the canonical URL is not setted if there isn't the query_param in the current URL.

peximo’s picture

Status: Needs review » Fixed

Status: Fixed » Closed (fixed)

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