Weave Code
Code Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message
Easy Redirect Bundle

Easy Redirect Bundle Laravel Package

agence-adeliom/easy-redirect-bundle

Symfony bundle to manage URL redirects and log 404 errors. Intercepts 404s, looks up matching redirects, performs redirects, and updates hit count/last accessed. Stores 404 path/URL/timestamp/referer for stats and clears matching 404s when redirects change.

View on GitHub
Deep Wiki
Context7

Symfony redirection bundle for EasyAdmin

Frequently asked questions about Easy Redirect Bundle
Does this bundle work with Laravel or only Symfony?
This package is designed for Symfony, not Laravel. If you're using Laravel, you’ll need to explore alternatives like Laravel’s built-in redirect middleware or third-party Laravel packages for similar functionality.
How do I install this bundle in a Symfony project?
Run `composer require agence-adeliom/easy-redirect-bundle`, update your `config/packages/easy_redirect.yaml` with your entity classes, and run migrations using `php bin/console doctrine:migration:diff` followed by `php bin/console doctrine:migration:migrate`.
What Symfony and PHP versions does this bundle support?
The latest version (3.x) supports Symfony 6.4/7.x and PHP 8.2+. Older versions (2.x) support Symfony 5.4/6.x and PHP 8.0.2+. Check the [README](https://github.com/agence-adeliom/easy-redirect-bundle) for exact compatibility.
Can I use this bundle without EasyAdmin?
No, this bundle is tightly coupled with EasyAdmin (v3.4+ or v4.0+). If you don’t use EasyAdmin, you’ll need to either adopt it or fork/modify the bundle to work with another admin panel, which may introduce maintenance challenges.
How does the 404 logging feature work, and can I disable it?
The bundle logs 404 errors to the database with details like path, URL, timestamp, and referrer. You can disable or configure this behavior via `config/packages/easy_redirect.yaml` by adjusting settings like `remove_not_founds` or skipping the listener.
Will this bundle conflict with existing redirect systems (e.g., .htaccess or custom controllers)?
Yes, conflicts are possible if your project already handles redirects or 404s via custom logic or tools like .htaccess. Audit your existing setup before integrating this bundle to avoid overlaps or unexpected behavior.
How do I customize the redirect form or add extra fields?
Extend the provided `RedirectFormType` in your project by creating a custom form type class and overriding the fields. The bundle’s `EasyRedirectTrait` in EasyAdmin also allows you to integrate the redirect management into your dashboard menu.
Does this bundle support bulk operations for redirects or 404s?
The bundle doesn’t natively support bulk operations out of the box. However, you can leverage Doctrine’s repository methods or EasyAdmin’s built-in CRUD features to implement custom bulk actions for redirects or 404 records.
How can I optimize performance for high-traffic sites with 404 logging?
For high-traffic sites, ensure the `path` column in the `redirect` table is indexed for faster lookups. Consider batching inserts for 404 logs or implementing async logging to reduce database load. Retention policies (e.g., purging old logs) can also help.
What happens to logged 404s when I update or create a redirect?
When you create or update a redirect, the bundle automatically deletes any logged 404 records that match the redirect’s path. This behavior is controlled by the `remove_not_founds` configuration and can be tested in staging to avoid data loss.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
daikazu/eloquent-salesforce-objects
unseen-codes/chat
romalytar/yammi-jobs-monitoring-laravel
kisame76/filament-db-table-state
nqxcode/laravel-lucene-search
dpfx/laravel-livewire-wizards
workos/workos-php-laravel
sofa/laravel-global-scope
nawasara/auth-primitives
adhocrat-io/arkhe-main
make-dev/orca-harpoon
itsemon245/lamet
baks-dev/dashboard
amoifr/pickle-panther-bundle
make-dev/orca
dmstr/symfony-system-resources-bundle
dmstr/symfony-job-queue-bundle
dmstr/openapi-json-schema-bundle
dmstr/keycloak-security-bundle
dmstr/doctrine-audit-log-bundle