diff options
author | Joas Schilling <nickvergessen@gmx.de> | 2014-05-16 11:38:37 +0200 |
---|---|---|
committer | Joas Schilling <nickvergessen@gmx.de> | 2014-05-16 11:38:37 +0200 |
commit | 0ad2e22ec01deb40fdd174890ae92d896649a424 (patch) | |
tree | 57369f6d19f84670ef86ba32246b36f471dc24d2 | |
parent | 08b5d052c6284514208b6af2e3b286c4c1f86f26 (diff) | |
download | forums-0ad2e22ec01deb40fdd174890ae92d896649a424.tar forums-0ad2e22ec01deb40fdd174890ae92d896649a424.tar.gz forums-0ad2e22ec01deb40fdd174890ae92d896649a424.tar.bz2 forums-0ad2e22ec01deb40fdd174890ae92d896649a424.tar.xz forums-0ad2e22ec01deb40fdd174890ae92d896649a424.zip |
[ticket/12555] Add canonical URL for viewtopic
Avoids duplicate content of:
* viewtopic.php?t=topic_id
* viewtopic.php?f=forum_id&t=topic_id
* viewtopic.php?f=forum_id&t=topic_id&hilit=highlight_string
* viewtopic.php?f=forum_id&t=topic_id&view=unread
* viewtopic.php?f=forum_id&p=post_id
* viewtopic.php?f=forum_id&t=topic_id&start=0
PHPBB3-12555
-rw-r--r-- | phpBB/viewtopic.php | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/phpBB/viewtopic.php b/phpBB/viewtopic.php index 95bee9789f..4553917d80 100644 --- a/phpBB/viewtopic.php +++ b/phpBB/viewtopic.php @@ -642,6 +642,7 @@ $template->assign_vars(array( 'U_TOPIC' => "{$server_path}viewtopic.$phpEx?f=$forum_id&t=$topic_id", 'U_FORUM' => $server_path, 'U_VIEW_TOPIC' => $viewtopic_url, + 'U_CANONICAL' => generate_board_url() . '/' . append_sid("viewtopic.$phpEx", "t=$topic_id" . ((strlen($u_sort_param)) ? "&$u_sort_param" : '') . (($start) ? "&start=$start" : ''), true, ''), 'U_VIEW_FORUM' => append_sid("{$phpbb_root_path}viewforum.$phpEx", 'f=' . $forum_id), 'U_VIEW_OLDER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=previous"), 'U_VIEW_NEWER_TOPIC' => append_sid("{$phpbb_root_path}viewtopic.$phpEx", "f=$forum_id&t=$topic_id&view=next"), |