summaryrefslogtreecommitdiff
path: root/inc/template.php
diff options
context:
space:
mode:
authorAnika Henke <anika@selfthinker.org>2014-08-02 14:24:04 +0100
committerAnika Henke <anika@selfthinker.org>2014-08-02 14:24:04 +0100
commit01f9be51e2f5b61e20deb8f9c92eccb62fa12a17 (patch)
tree8382c530aeea40bf48afcd8a251cbe1bbdbd6bc6 /inc/template.php
parent75112fc56c5237220d4fe1b104317f62eda8a561 (diff)
downloadrpg-01f9be51e2f5b61e20deb8f9c92eccb62fa12a17.tar.gz
rpg-01f9be51e2f5b61e20deb8f9c92eccb62fa12a17.tar.bz2
set canonical URL to root when on start page
Diffstat (limited to 'inc/template.php')
-rw-r--r--inc/template.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/inc/template.php b/inc/template.php
index 8b39529c5..7f3c68534 100644
--- a/inc/template.php
+++ b/inc/template.php
@@ -369,7 +369,11 @@ function tpl_metaheaders($alt = true) {
} else {
$head['meta'][] = array('name'=> 'robots', 'content'=> 'noindex,nofollow');
}
- $head['link'][] = array('rel'=> 'canonical', 'href'=> wl($ID, '', true, '&'));
+ $canonicalUrl = wl($ID, '', true, '&');
+ if ($ID == $conf['start']) {
+ $canonicalUrl = DOKU_URL;
+ }
+ $head['link'][] = array('rel'=> 'canonical', 'href'=> $canonicalUrl);
} else {
$head['meta'][] = array('name'=> 'robots', 'content'=> 'noindex,follow');
}