PHPackages                             abenmada/sylius-broken-link-handler-plugin - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Utility &amp; Helpers](/categories/utility)
4. /
5. abenmada/sylius-broken-link-handler-plugin

ActiveSylius-plugin[Utility &amp; Helpers](/categories/utility)

abenmada/sylius-broken-link-handler-plugin
==========================================

The Broken Link Handler plugin automatically redirects outdated product and taxon slugs to their new versions, ensuring they remain permanent and preventing their reuse by other entities

v1.0.0(1y ago)74MITPHPPHP ^8.0

Since Nov 3Pushed 1y ago1 watchersCompare

[ Source](https://github.com/ayman-benmada/Sylius-Broken-Link-Handler-Plugin)[ Packagist](https://packagist.org/packages/abenmada/sylius-broken-link-handler-plugin)[ RSS](/packages/abenmada-sylius-broken-link-handler-plugin/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (1)Dependencies (30)Versions (2)Used By (0)

Sylius Broken Link Handler Plugin
=================================

[](#sylius-broken-link-handler-plugin)

 The Broken Link Handler plugin automatically redirects outdated product and taxon slugs to their new versions, ensuring they remain permanent and preventing their reuse by other entities.

 The goal is to optimize your site so that search engines can index it more effectively, which will help improve its organic search ranking (SEO).

Presentation
------------

[](#presentation)

Whenever you create or update a product's slug, it will be automatically saved in the product's slug history.

[![presentation photo](https://github.com/ayman-benmada/sylius-broken-link-handler-plugin/raw/main/src/Resources/public/presentation-1.png?raw=true)](https://github.com/ayman-benmada/sylius-broken-link-handler-plugin/blob/main/src/Resources/public/presentation-1.png?raw=true)

A slug that has already been used for a product can never be reused for another. This ensures that old slugs will always remain associated with the same product, so that when accessing an old slug, the user will be redirected to the new one.

[![presentation photo](https://github.com/ayman-benmada/sylius-broken-link-handler-plugin/raw/main/src/Resources/public/presentation-2.png?raw=true)](https://github.com/ayman-benmada/sylius-broken-link-handler-plugin/blob/main/src/Resources/public/presentation-2.png?raw=true)

For example, if someone tries to access the URL `/fr_FR/products/000f-grey-jeans`, a 301 redirect will automatically lead to `/fr_FR/products/000f-v2-jean-gris`.

This slug management system is also implemented for taxons. Thus, when attempting to access the page `/fr_FR/taxons/t-shirts/les-hommes`, a redirection will occur to `/fr_FR/taxons/t-shirts/hommes`.

[![presentation photo](https://github.com/ayman-benmada/sylius-broken-link-handler-plugin/raw/main/src/Resources/public/presentation-3.png?raw=true)](https://github.com/ayman-benmada/sylius-broken-link-handler-plugin/blob/main/src/Resources/public/presentation-3.png?raw=true)

Installation
------------

[](#installation)

Require plugin with composer :

```
composer require abenmada/sylius-broken-link-handler-plugin
```

Change your `config/bundles.php` file to add the line for the plugin :

```
