Skip to content

Latest commit

 

History

History
18 lines (18 loc) · 975 Bytes

2020-09-14-canonical-redirect-setting.md

File metadata and controls

18 lines (18 loc) · 975 Bytes
title issue author author_email author_github
Allow indicating canonical URLs with a redirect (HTTP 301) instead of a link
NEXT-6753
Philip Gatzka
p.gatzka@shopware.com
philipgatzka

Core

  • Added the \Shopware\Core\Framework\Routing\CanonicalRedirectService which is responsible for determining, wether a redirect response needs to be sent.
  • Changed method doHandle() of the \Shopware\Core\HttpKernel to use the CanonicalRedirectService to decide wether all preconditions for a redirect are met.
  • Added \Shopware\Core\Framework\Event\BeforeSendRedirectResponseEvent which is fired by the doHandle() method of the \Shopware\Core\HttpKernel just before sending a redirect response.

Administration

  • Changed src/module/sw-settings-seo/page/sw-settings-seo/sw-settings-seo.html.twig to include a switch which allows administrators to select, wether a redirect or a <link rel="canonical"> should be used to tag superseded SEO URLs.