PHPackages                             tallieutallieu/dry-redirects - 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. tallieutallieu/dry-redirects

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

tallieutallieu/dry-redirects
============================

Dry Redirects

3.2.7(1w ago)0257PHP

Since Aug 20Pushed 4mo agoCompare

[ Source](https://github.com/TallieuTallieu/dry-redirects)[ Packagist](https://packagist.org/packages/tallieutallieu/dry-redirects)[ RSS](/packages/tallieutallieu-dry-redirects/feed)WikiDiscussions master Synced 3d ago

READMEChangelog (10)Dependencies (6)Versions (21)Used By (0)

Dry Redirects
=============

[](#dry-redirects)

A URL redirection package for the Dry PHP framework. This package allows you to manage redirects through an admin interface and automatically handle URL redirections with parameter support.

Features
--------

[](#features)

- Admin interface for managing redirects
- Support for 301 (permanent), 302 (temporary), and 404 (not found) redirects
- Parameter matching and substitution (e.g., `/product/{id}` → `/products/{id}`)
- Redirect hit tracking and logging
- Database migrations for easy setup

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

[](#installation)

### Via Composer

[](#via-composer)

```
composer require tallieutallieu/dry-redirects
```

### Service Provider Registration

[](#service-provider-registration)

Add the service provider to your application:

```
// In your application's service provider registration
$app->register(Tnt\Redirects\RedirectServiceProvider::class);
```

### Database Migration

[](#database-migration)

Run the database migrations to create the necessary tables:

```
php oak migration migrate
```

Usage
-----

[](#usage)

### Creating Redirects

[](#creating-redirects)

Navigate to the admin interface at `/admin/redirects` and create redirects with:

1. **Source Path**: The URL pattern to match (e.g., `/old-path` or `/product/{id}`)
2. **Target Path**: The destination URL (e.g., `/new-path` or `/products/{id}`)
3. **Status Code**: 301 (permanent), 302 (temporary), or 404 (not found)
4. **Active**: Enable/disable the redirect

### Parameter Substitution

[](#parameter-substitution)

You can use parameters in your redirects by enclosing them in curly braces:

- Source Path: `/product/{id}`
- Target Path: `/products/{id}`

When a user visits `/product/123`, they will be redirected to `/products/123`.

### Redirect Logs

[](#redirect-logs)

The system automatically logs all redirect hits. You can view these logs in the admin interface at `/admin/redirects/redirect-logs`.

Under the Hood
--------------

[](#under-the-hood)

The package works by:

1. Loading all active redirects from the database at application boot
2. Registering dynamic routes for each redirect
3. When a redirect is triggered:
    - Parameters are extracted and substituted
    - A `RouteWasHit` event is dispatched (for logging)
    - The user is redirected to the target URL with the appropriate status code

Administration
--------------

[](#administration)

The admin interface provides two main sections:

1. **Redirects**: Create, edit, and delete redirects
2. **Redirect Logs**: View and manage redirect hit logs

Requirements
------------

[](#requirements)

- tallieutallieu/dry: ^v3.1.0
- tallieutallieu/oak: dev-php8.2

License
-------

[](#license)

This package is proprietary software developed by Tallieu &amp; Tallieu.

###  Health Score

46

—

FairBetter than 93% of packages

Maintenance86

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity64

Established project with proven stability

 Bus Factor1

Top contributor holds 93.8% 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 ~116 days

Recently: every ~77 days

Total

19

Last Release

7d ago

Major Versions

0.0.2 → 3.0.02025-05-19

0.1.0 → 3.0.12025-05-19

0.1.2 → 3.1.22025-05-19

1.0.0 → 3.2.52025-07-03

### Community

Maintainers

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

---

Top Contributors

[![pienter-tech](https://avatars.githubusercontent.com/u/17959719?v=4)](https://github.com/pienter-tech "pienter-tech (30 commits)")[![NathanGeerinck](https://avatars.githubusercontent.com/u/9437467?v=4)](https://github.com/NathanGeerinck "NathanGeerinck (2 commits)")

### Embed Badge

![Health badge](/badges/tallieutallieu-dry-redirects/health.svg)

```
[![Health](https://phpackages.com/badges/tallieutallieu-dry-redirects/health.svg)](https://phpackages.com/packages/tallieutallieu-dry-redirects)
```

PHPackages © 2026

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