I would like to add a canonical
tag which points to another domain.
My TYPOScript looks like this:
temp.canonical = TEXT
temp.canonical {
typolink {
parameter.data = TSFE:id
returnLast = url
}
wrap = <link rel="canonical" href="http://myotherdomain.com/|" />
}
page.headerData.123 < temp.canonical
Unfortunately this returns the full URL instead of the path which results in the following:
<link rel="canonical" href="http://myotherdomain.com/http://example.com/subpage" />
Funny... I always have to configure the typolink
to get a full link. Probably this is caused because in the most projects of me I've configured
Maybe this will help you to not get a full URL but attention that your system is still working correctly after setting a baseUrl if you didn't configure it earlier. Are there maybe other settings in your config. that could be the reason for this problem?