PHPackages                             advancedideasmechanics/mezzio-canonical-url - 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. advancedideasmechanics/mezzio-canonical-url

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

advancedideasmechanics/mezzio-canonical-url
===========================================

PSR-7 Canonical URL middleware for Mezzio applications.

v0.0.6(1mo ago)025MITPHPPHP ~8.1.0 || ~8.2.0 || ~8.3.0 || ~8.4.0 || ~8.5.0

Since Jun 15Pushed 1mo agoCompare

[ Source](https://github.com/AdvancedIdeasMechanics/mezzio-canonical-url)[ Packagist](https://packagist.org/packages/advancedideasmechanics/mezzio-canonical-url)[ Docs](https://advanced.im/product/mezzio-canonical-url)[ RSS](/packages/advancedideasmechanics-mezzio-canonical-url/feed)WikiDiscussions dev Synced 2w ago

READMEChangelog (6)Dependencies (5)Versions (8)Used By (0)

Mezzio Canonical URL
====================

[](#mezzio-canonical-url)

PSR-7 Canonical URL middleware for Mezzio applications.

### Composer

[](#composer)

`composer install advancedideasmechanics/mezzio-canonical-url`

#### Use

[](#use)

For pipeline.php Middleware Use.

Recommend placing between $app-&gt;pipe(RouteMiddleware::class); and $app-&gt;pipe(ImplicitHeadMiddleware::class);

`$app->pipe(AdvancedIdeasMechanics\MezzioCanonicalUrl\Middleware\CanonicalUrlMiddleware::class);`

For route.php Middleware use.

`use AdvancedIdeasMechanics\MezzioCanonicalUrl\Middleware\CanonicalUrlMiddleware;`

`$app->get('/', [CanonicalUrlMiddleware:class, App\Handler\HomePageHandler::class], 'home');`

Set below in the templates\\layout\\default.phtml

`if (isset($this->canonicalUrl)) { $this->headLink(['rel' => 'canonical', 'href' => $this->canonicalUrl]); }`

If you want to override another page, example templates\\app\\about.phtml

`$this->canonicalUrl = 'https://example.com/about';`

###  Health Score

40

—

FairBetter than 86% of packages

Maintenance91

Actively maintained with recent releases

Popularity9

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity46

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

Total

6

Last Release

44d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/54c4511671b701eaea9e099598e2095781b145029009748f477d23564ab2197c?d=identicon)[advancedim](/maintainers/advancedim)

---

Top Contributors

[![matthewpallotta](https://avatars.githubusercontent.com/u/8971883?v=4)](https://github.com/matthewpallotta "matthewpallotta (8 commits)")

---

Tags

phplibrarymezziocanonicalmatthewpallottaadvancedideasmechanics

### Embed Badge

![Health badge](/badges/advancedideasmechanics-mezzio-canonical-url/health.svg)

```
[![Health](https://phpackages.com/badges/advancedideasmechanics-mezzio-canonical-url/health.svg)](https://phpackages.com/packages/advancedideasmechanics-mezzio-canonical-url)
```

###  Alternatives

[mezzio/mezzio

PSR-15 Middleware Microframework

3923.8M127](/packages/mezzio-mezzio)[hyperf/hyperf

A coroutine framework that focuses on hyperspeed and flexibility. Building microservice or middleware with ease.

6.9k3.3k2](/packages/hyperf-hyperf)[mezzio/mezzio-authentication-oauth2

OAuth2 (server) authentication middleware for Mezzio and PSR-7 applications.

28591.3k3](/packages/mezzio-mezzio-authentication-oauth2)[mezzio/mezzio-tooling

Migration and development tooling for Mezzio

191.2M22](/packages/mezzio-mezzio-tooling)

PHPackages © 2026

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