title | issue | author | author_email | author_github |
---|---|---|---|---|
Allow indicating canonical URLs with a redirect (HTTP 301) instead of a link |
NEXT-6753 |
Philip Gatzka |
philipgatzka |
- 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 theCanonicalRedirectService
to decide wether all preconditions for a redirect are met. - Added
\Shopware\Core\Framework\Event\BeforeSendRedirectResponseEvent
which is fired by thedoHandle()
method of the\Shopware\Core\HttpKernel
just before sending a redirect response.
- 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.