Skip to content

Commit

Permalink
magento#14971: Improper Handling of Pagination SEO
Browse files Browse the repository at this point in the history
This removes the p= query string parameter in pagination for the first page, when navigating back to page 1, to avoid duplicate content SEO issues.
  • Loading branch information
benathomeofchampions committed Jun 18, 2019
1 parent 6e534ad commit ab9d188
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion app/code/Magento/Theme/Block/Html/Pager.php
Original file line number Diff line number Diff line change
Expand Up @@ -450,7 +450,9 @@ public function getLastPageUrl()
*/
public function getPageUrl($page)
{
return $this->getPagerUrl([$this->getPageVarName() => $page]);
return $this->getPagerUrl([
$this->getPageVarName() => $page > 1 ? $page : null,
]);
}

/**
Expand Down

0 comments on commit ab9d188

Please sign in to comment.