I made this by changing files of the DokuWiki engine:
In file: inc/template.php , lines 374-376:
$canonicalUrl = wl($ID, '', true, '&');
if ($ID == $conf['start']) {
$canonicalUrl = DOKU_URL;
}
chang to:
$canonicalUrl = 'https://mysite.it'.wl($INFO['id']);
if ($ID == $conf['start']) {
$canonicalUrl = 'https://mysite.it/';
}
But, these changes are to be lost after updating. Is there a way to keep it after updating and not to change manually every time after updating the engine? Is there a way to make it by editing the site's template (theme) files?