PHPackages                             locomotivemtl/charcoal-contrib-redirect - 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. locomotivemtl/charcoal-contrib-redirect

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

locomotivemtl/charcoal-contrib-redirect
=======================================

A charcoal admin service that provides redirection.

0.1.1(4y ago)012MITPHPPHP &gt;7.4

Since May 6Pushed 4y ago7 watchersCompare

[ Source](https://github.com/locomotivemtl/charcoal-contrib-redirect)[ Packagist](https://packagist.org/packages/locomotivemtl/charcoal-contrib-redirect)[ Docs](https://locomotivemtl.github.io/charcoal-contrib-redirect/)[ RSS](/packages/locomotivemtl-charcoal-contrib-redirect/feed)WikiDiscussions master Synced today

READMEChangelog (1)Dependencies (4)Versions (3)Used By (0)

Charcoal Redirect
=================

[](#charcoal-redirect)

[![License](https://camo.githubusercontent.com/3ea9a222deb3b7dc392df6645a1af73abe79832c8a9eba011da5cf8b63f56cf7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d72656469726563742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-redirect)[![Latest Stable Version](https://camo.githubusercontent.com/b2ab7f32e042bfe74200384920c6cc58abe1fe1538c56aa14b17de075f67f507/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d72656469726563742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-redirect)[![Build Status](https://camo.githubusercontent.com/f86102da12ed6e2b06096fff01c91152f9510abc7cf70c182630ab99a724820d/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f636f6d2f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d72656469726563743f7374796c653d666c61742d737175617265)](https://travis-ci.com/locomotivemtl/charcoal-contrib-redirect)[![Php version](https://camo.githubusercontent.com/25d9eba10a86a76e0e4a19d027d2846b6352a164497411d8f4f9a57a4fecd019/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f7068702d762f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d72656469726563743f7374796c653d666c61742d737175617265)](https://packagist.org/packages/locomotivemtl/charcoal-contrib-redirect)[![Tabulator version](https://camo.githubusercontent.com/4dcd6564bd0576b0e9830ff7ebe2252c1d7e6bcb94c494b0fc65350b2a6b41bf/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f7061636b6167652d6a736f6e2f646570656e64656e63792d76657273696f6e2f6c6f636f6d6f746976656d746c2f63686172636f616c2d636f6e747269622d72656469726563742f746162756c61746f722d7461626c65733f7374796c653d666c61742d737175617265)](https://github.com/olifolkerd/tabulator)

A [Charcoal](https://packagist.org/packages/locomotivemtl/charcoal-app) service provider to handle route redirections from the `admin` interface.

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
    - [Dependencies](#dependencies)
- [Service Provider](#service-provider)
    - [Services](#services)
- [Configuration](#configuration)
- [Usage](#usage)
- [Development](#development)
    - [API Documentation](#api-documentation)
    - [Development Dependencies](#development-dependencies)
    - [Coding Style](#coding-style)
- [Credits](#credits)
- [License](#license)

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

[](#installation)

The preferred (and only supported) method is with Composer:

```
$ composer require locomotivemtl/charcoal-contrib-redirect
```

### Dependencies

[](#dependencies)

#### Required

[](#required)

- [**PHP 7.4+**](https://php.net)

#### PSR

[](#psr)

- [**PSR-11**](https://www.php-fig.org/psr/psr-11/): Common interface for dependency containers. Fulfilled by Pimple.

Service Provider
----------------

[](#service-provider)

The following services are provided with the use of [\_ charcoal-contrib-redirect\_](https://github.com/locomotivemtl/charcoal-contrib-redirect)

### Services

[](#services)

- [redirection](src/Charcoal/Redirect/Service/RedirectionService.php) instance of `\Charcoal\Redirect\Service\Redirection`

Configuration
-------------

[](#configuration)

The only required configuration for the redirect module is to require the module in the list of loaded modules in the app configuration.

```
{
    "modules": {
        "charcoal/redirect/redirect": {}
    }
}
```

Usage
-----

[](#usage)

When the module is loaded, a new database table (`charcoal_contrib_redirect_redirections`) will be created automatically when needed. This table will be used to store redirections. When in the admin interface, a new *item* is added to the system menu dropdown (`Url redirections`)

[![system menu](readme_image1.png)](readme_image1.png)

This system menu item requires the user to adhere to the `"system/admin"` acl permission.

Development
-----------

[](#development)

To install the development environment:

```
$ composer install
```

To run the scripts (phplint, phpcs, and phpunit):

```
$ composer test
```

### API Documentation

[](#api-documentation)

- The auto-generated `phpDocumentor` API documentation is available at:

- The auto-generated `apigen` API documentation is available at:
    [https://codedoc.pub/locomotivemtl/charcoal-contrib-redirect/master/](https://codedoc.pub/locomotivemtl/charcoal-contrib-redirect/master/index.html)

### Development Dependencies

[](#development-dependencies)

- \[php-coveralls/php-coveralls\]\[phpcov\]
- \[phpunit/phpunit\]\[phpunit\]
- \[squizlabs/php\_codesniffer\]\[phpcs\]

### Coding Style

[](#coding-style)

The charcoal-contrib-redirect module follows the Charcoal coding-style:

- [*PSR-1*](https://www.php-fig.org/psr/psr-1/)
- [*PSR-2*](https://www.php-fig.org/psr/psr-2/)
- [*PSR-4*](https://www.php-fig.org/psr/psr-4/), autoloading is therefore provided by *Composer*.
- [*phpDocumentor*](http://phpdoc.org/) comments.
- [phpcs.xml.dist](phpcs.xml.dist) and [.editorconfig](.editorconfig) for coding standards.

> Coding style validation / enforcement can be performed with `composer phpcs`. An auto-fixer is also available with `composer phpcbf`.

Credits
-------

[](#credits)

- [Locomotive](https://locomotive.ca/)
- [Joel Alphonso](mailto:joel@locomotive.ca)

License
-------

[](#license)

Charcoal is licensed under the MIT license. See [LICENSE](LICENSE) for details.

###  Health Score

20

—

LowBetter than 13% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 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 ~5 days

Total

2

Last Release

1515d ago

### Community

Maintainers

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

---

Top Contributors

[![JoelAlphonso](https://avatars.githubusercontent.com/u/10762266?v=4)](https://github.com/JoelAlphonso "JoelAlphonso (48 commits)")

---

Tags

routingcharcoalredirect

###  Code Quality

TestsPHPUnit

Code StylePHP\_CodeSniffer

### Embed Badge

![Health badge](/badges/locomotivemtl-charcoal-contrib-redirect/health.svg)

```
[![Health](https://phpackages.com/badges/locomotivemtl-charcoal-contrib-redirect/health.svg)](https://phpackages.com/packages/locomotivemtl-charcoal-contrib-redirect)
```

###  Alternatives

[symfony/routing

Maps an HTTP request to a set of configuration variables

7.7k835.3M2.5k](/packages/symfony-routing)[nikic/fast-route

Fast request router for PHP

5.4k97.5M770](/packages/nikic-fast-route)[altorouter/altorouter

A lightning fast router for PHP

1.3k3.5M75](/packages/altorouter-altorouter)[aura/router

Powerful, flexible web routing for PSR-7 requests.

5221.6M69](/packages/aura-router)[upstatement/routes

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

2002.6M6](/packages/upstatement-routes)[aplus/routing

Aplus Framework Routing Library

2521.6M3](/packages/aplus-routing)

PHPackages © 2026

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