From: umorigu Date: Mon, 4 Sep 2017 14:07:03 +0000 (+0900) Subject: BugTrack/2213 Use Absolute URI as Canonical URL X-Git-Tag: r1_5_4~192 X-Git-Url: http://git.osdn.net/view?p=pukiwiki%2Fpukiwiki.git;a=commitdiff_plain;h=42880ef94a44ff5dc080bb3e239af620e42371bc BugTrack/2213 Use Absolute URI as Canonical URL --- diff --git a/lib/html.php b/lib/html.php index 960fb25..d128972 100644 --- a/lib/html.php +++ b/lib/html.php @@ -48,9 +48,10 @@ function catbody($title, $page, $body) $r_page = pagename_urlencode($_page); // Canonical URL - $canonical_url = $script; - if ($_page !== $defaultpage) { - $canonical_url = $script . '?' . $r_page; + if ($_page === $defaultpage) { + $canonical_url = get_base_uri(PKWK_URI_ABSOLUTE); + } else { + $canonical_url = get_page_uri($_page, PKWK_URI_ABSOLUTE); } // Set $_LINK for skin