OSDN Git Service
(root)
/
pukiwiki
/
pukiwiki.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
87416fb
)
BugTrack/2213 Use Absolute URI as Canonical URL
author
umorigu
<umorigu@gmail.com>
Mon, 4 Sep 2017 14:07:03 +0000
(23:07 +0900)
committer
umorigu
<umorigu@gmail.com>
Mon, 4 Sep 2017 14:07:03 +0000
(23:07 +0900)
lib/html.php
patch
|
blob
|
history
diff --git
a/lib/html.php
b/lib/html.php
index
960fb25
..
d128972
100644
(file)
--- 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