PHPackages                             jidoka1902/redirecting-fallbacks - 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. [HTTP &amp; Networking](/categories/http)
4. /
5. jidoka1902/redirecting-fallbacks

ActiveLibrary[HTTP &amp; Networking](/categories/http)

jidoka1902/redirecting-fallbacks
================================

The redirecting-fallbacks project aims to provide an standardized way to configure your http redirects. e.g.: instead of showing an 404 page, redirect to the start page.

v1.0.1(7y ago)0701BSD-3-ClausePHPPHP ^7

Since Dec 6Pushed 7y ago1 watchersCompare

[ Source](https://github.com/jidoka1902/redirecting-fallbacks)[ Packagist](https://packagist.org/packages/jidoka1902/redirecting-fallbacks)[ RSS](/packages/jidoka1902-redirecting-fallbacks/feed)WikiDiscussions master Synced 2mo ago

READMEChangelogDependencies (1)Versions (3)Used By (1)

redirecting-fallbacks
=====================

[](#redirecting-fallbacks)

Goals
-----

[](#goals)

The "redirecting-fallbacks" project aims to give developers a standard framework to configure redirects. But this needs some Integration work into your Framework of choice.

Therefore this is just a very lean backend for further integrations.

Audience
--------

[](#audience)

This library is for developers.

If you have any proposals for enhancements or just found a bug, please let me know via [github-issues](https://github.com/jidoka1902/redirecting-fallbacks/issues/new) or even create a [pull-request](https://github.com/jidoka1902/redirecting-fallbacks/pulls) ;)

Symfony
-------

[](#symfony)

For the Symfony ecosystem, there is already an [integration](https://packagist.org/packages/jidoka1902/redirecting-fallbacks-symfony) provided. If you need some inspiration how this library could work within a framework, please have a look there.

Parts explained
---------------

[](#parts-explained)

### RedirectResolver

[](#redirectresolver)

RedirectResolvers are the brain of this tiny project. They need a configuration to find out if they can give you a redirect target for an url path.

- The **SingleRedirectResolver** implementation just needs one redirect path configured and every requested route will return that target.
- The **MultipleRedirectResolver** takes a list of "paths" and "targets". So you can specify a hierarchy of redirects. E.g. the request to /posts will give you another target than the request to "/".
- If you have long lists of Redirect Configurations or another **RedirectResolver** which takes quiet a bit time to resolve the request-path - there is a **CachedRedirectResolver** implementation. This just caches your RedirectResolver::resolve() for the case you need to call it twice of more often within your integration.

But wait - this lib just resolves configurations? Yes - what event you want to listen to is your integration stuff.

### RedirectResolverCache

[](#redirectresolvercache)

The **RedirectResolverCache** is just the extracted Caching behaviour from the **CachedRedirectResolver**. The default behaviour is an **ArrayCache** so time consuming resolves will be reduced. But feel free to create your own implementations to whatever seems important to you ;)

### UrlGenerator

[](#urlgenerator)

The **UrlGenerator** provides exchangeable behaviour for what your configured "targets" will be as result of the **RedirectResolver**::resolve() method. So you could replace the **PassthroughUrlGenerator** (wich just returns the resolved targets one-to-one). So within the Symfony Integration that could just be changed to an Symfony Router Adapter.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~162 days

Total

2

Last Release

2914d ago

PHP version history (2 changes)v1.0.0PHP ^7.1

v1.0.1PHP ^7

### Community

Maintainers

![](https://www.gravatar.com/avatar/d73890da6cb16da67f8092524d9cbd951ab517c8876ccb3f9c5f754390f6aabd?d=identicon)[Jidoka1902](/maintainers/Jidoka1902)

---

Top Contributors

[![Jidoka1902](https://avatars.githubusercontent.com/u/15986183?v=4)](https://github.com/Jidoka1902 "Jidoka1902 (35 commits)")

---

Tags

redirect404fallbackredirectsredirecting

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/jidoka1902-redirecting-fallbacks/health.svg)

```
[![Health](https://phpackages.com/badges/jidoka1902-redirecting-fallbacks/health.svg)](https://phpackages.com/packages/jidoka1902-redirecting-fallbacks)
```

###  Alternatives

[upstatement/routes

Manage rewrites and routes in WordPress with this dead-simple plugin

2072.5M6](/packages/upstatement-routes)[nystudio107/craft-retour

Retour allows you to intelligently redirect legacy URLs, so that you don't lose SEO value when rebuilding &amp; restructuring a website

40975.2k15](/packages/nystudio107-craft-retour)[fsasvari/laravel-trailing-slash

The package that adds redirection with trailing slash to Laravel framework.

63164.3k](/packages/fsasvari-laravel-trailing-slash)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
