sulu/redirect-bundle

Sulu bundle for managing redirects

Installs: 166 346

Dependents: 1

Suggesters: 0

Security: 0

Stars: 18

Watchers: 12

Forks: 19

Open Issues: 5

Type:sulu-bundle

2.1.4 2024-07-24 14:51 UTC

This package is auto-updated.

Last update: 2024-10-24 15:27:23 UTC


README

Official Sulu Bundle Badge

GitHub license GitHub tag (latest SemVer) Test workflow status Sulu compatibility


The SuluRedirectBundle adds simple but powerful capabilities for managing redirects to Sulu’s administration interface and allows content managers to manage redirects without any knowledge of web servers.


SuluRedirectBundle Slideshow


The SuluRedirectBundle is compatible with Sulu starting from version 2.0. Have a look at the require section in the composer.json to find an up-to-date list of the requirements of the bundle.

🚀  Installation and Documentation

Execute the following composer commands to add the bundle to the dependencies of your project:

composer require sulu/redirect-bundle

Afterwards, visit the bundle documentation to find out how to set up and configure the SuluRedirectBundle to your specific needs.

💡  Features

Importing redirects

One of the great features of this bundle is the ability to import redirects from a CSV file. The most simplified file just contains two columns, source and target. Of course, all the other options like statusCode, sourceHost, and enabled can also be set in the import file.

It’s also possible to override existing redirects with an import; you just have to set the same value for source.

Enabling and disabling redirects

Sometimes it’s necessary to prepare redirects which are not ready yet, especially if you have a large number of redirects. Of course there’s a solution for that — toggler in the toolbar to enable or disable redirects quickly. This allows you to import a large number of disabled redirects and then check them in the administration interface, before enabling them when needed.

Different statuses

The SuluRedirectBundle comes with three different statuses to be used for redirects:

  • 301 Moved permanently
  • 302 Moved temporarily
  • 410 Gone

Those status codes are explained in detail here.

Automatic Gone redirects

This bundle also adds the possibility to automatically create redirects with status 410 Gone, if a page or a entity with a route has been removed. This is very useful, because now search engines know, that this page has been deleted.

Route Priorities

Redirects created via this bundle will only be used if no other route matches the given URL. This ensures that accidentally created or imported redirects do not affect existing pages. If a redirect matches the URL of an existing page, the redirect will only be effective after the page was unpublished.

In combination with the SuluAutomationBundle, this behaviour makes it possible to precautionarily create a redirect for the URL of an existing page that will be unpublished at a specified time in the future by the SuluAutomationBundle.

❤️  Support and Contributions

The Sulu content management system is a community-driven open source project backed by various partner companies. We are committed to a fully transparent development process and highly appreciate any contributions.

In case you have questions, we are happy to welcome you in our official Slack channel. If you found a bug or miss a specific feature, feel free to file a new issue with a respective title and description on the the sulu/SuluRedirectBundle repository.

📘  License

The Sulu content management system is released under the terms of the MIT License.