mirror of
https://github.com/e107inc/e107.git
synced 2025-01-16 20:28:28 +01:00
Fixes #4994 - Canonical URL domain should always be the same.
This commit is contained in:
parent
c3517641e0
commit
14f5142c66
@ -4052,8 +4052,16 @@ class e107
|
||||
$url = self::url($plugin, $key, $row, $options);
|
||||
}
|
||||
|
||||
|
||||
if(!empty($url))
|
||||
{
|
||||
$siteurl = self::getPref('siteurl');
|
||||
|
||||
if(!empty($siteurl) && $siteurl !== '/') // ensure that duplicate parked domains always use the primary site URL. @see issue #4994
|
||||
{
|
||||
$url = str_replace(SITEURL, $siteurl, $url);
|
||||
}
|
||||
|
||||
self::getJs()->addLink(array('rel'=>"canonical", "href" => $url));
|
||||
self::meta('og:url', $url);
|
||||
self::meta('twitter:url', $url);
|
||||
|
Loading…
x
Reference in New Issue
Block a user