vivien.prieur
02-04-2013, 04:26 PM
Hi,
I'd like to know how we can modify the content of the threads' canonical URLs tags in the forum part.
We have a vbulletin integrated within a drupal (news posted on the drupal are duplicated on the vbulletin) and we would need the search engine to reference the portal version of our news and not the forum version.
For that, we need to change the canonical URL generated by the VB Forum into the address of the portal.
For example we want to reference this in google :
http://lol.fureur.org/dossier/lol-guide-carry-ad-item-build-par-chaox
and not this :
http://www.fureur.org/forums/showthread.php?t=44639
And in the forum source code we can see that :
<link rel="canonical" href="showthread.php?t=44639" />
We need that instead :
<link rel="canonical" href="http://lol.fureur.org/dossier/lol-guide-carry-ad-item-build-par-chaox" />
Our URLs are stored in our database and we need to execute a PHP code in order to get them.
It isn't possible for us to do that in a simple .htaccess :/
Is it possible to use a hook (or a hack) in order to choose the way the canonical URL is generated? If yes, how/where would you do that?
Thanks in advance for the answers, please notify me if I'm posting in the wrong part of the forum.
Best regards,
Vivien
I'd like to know how we can modify the content of the threads' canonical URLs tags in the forum part.
We have a vbulletin integrated within a drupal (news posted on the drupal are duplicated on the vbulletin) and we would need the search engine to reference the portal version of our news and not the forum version.
For that, we need to change the canonical URL generated by the VB Forum into the address of the portal.
For example we want to reference this in google :
http://lol.fureur.org/dossier/lol-guide-carry-ad-item-build-par-chaox
and not this :
http://www.fureur.org/forums/showthread.php?t=44639
And in the forum source code we can see that :
<link rel="canonical" href="showthread.php?t=44639" />
We need that instead :
<link rel="canonical" href="http://lol.fureur.org/dossier/lol-guide-carry-ad-item-build-par-chaox" />
Our URLs are stored in our database and we need to execute a PHP code in order to get them.
It isn't possible for us to do that in a simple .htaccess :/
Is it possible to use a hook (or a hack) in order to choose the way the canonical URL is generated? If yes, how/where would you do that?
Thanks in advance for the answers, please notify me if I'm posting in the wrong part of the forum.
Best regards,
Vivien