diff --git a/app/controllers/list_controller.rb b/app/controllers/list_controller.rb index bea88a69e62a15..2fdb8fb1d59883 100644 --- a/app/controllers/list_controller.rb +++ b/app/controllers/list_controller.rb @@ -84,7 +84,7 @@ class ListController < ApplicationController end define_method("category_#{filter}") do - canonical_url "#{Discourse.base_url}#{@category.url}" + canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present? self.send(filter, category: @category.id) end @@ -93,7 +93,7 @@ class ListController < ApplicationController end define_method("parent_category_category_#{filter}") do - canonical_url "#{Discourse.base_url}#{@category.url}" + canonical_url "#{Discourse.base_url}#{@category.url}" unless params[:page].present? self.send(filter, category: @category.id) end diff --git a/app/controllers/topics_controller.rb b/app/controllers/topics_controller.rb index d139479de0989d..c1807ad3a66e8a 100644 --- a/app/controllers/topics_controller.rb +++ b/app/controllers/topics_controller.rb @@ -83,7 +83,7 @@ def show response.headers['X-Robots-Tag'] = 'noindex' end - canonical_url UrlHelper.absolute_without_cdn("#{Discourse.base_uri}#{@topic_view.canonical_path}") + canonical_url UrlHelper.absolute_without_cdn("#{Discourse.base_uri}#{@topic_view.canonical_path}") unless params[:page].present? perform_show_response