PHPackages                             cronfy/canonical - 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. cronfy/canonical

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

cronfy/canonical
================

Canonical origin solver

071PHP

Since Apr 11Pushed 6y agoCompare

[ Source](https://github.com/cronfy/canonical)[ Packagist](https://packagist.org/packages/cronfy/canonical)[ RSS](/packages/cronfy-canonical/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Redirect to canonical domain name/scheme
========================================

[](#redirect-to-canonical-domain-namescheme)

Provides framework agnostic redirects to canonical host/scheme without `.htaccess`.

Example:

```
$canonical = new \cronfy\canonical\Request();
$canonical->setCanonicalHost('example.com');
$canonical->setCanonicalScheme('https');
$canonical->redirectToCanonical();
```

If requested host/scheme does not match canonical ones, user will be redirected:

```
http://www.example.com/contacts/ => https://example.com/contacts/

```

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

[](#installation)

```
composer require cronfy/canonical dev-master
```

Related
-------

[](#related)

> > SO [Как сделать всё и сразу в mod\_rewrite?](https://ru.stackoverflow.com/questions/542869/%D0%9A%D0%B0%D0%BA-%D1%81%D0%B4%D0%B5%D0%BB%D0%B0%D1%82%D1%8C-%D0%B2%D1%81%D1%91-%D0%B8-%D1%81%D1%80%D0%B0%D0%B7%D1%83-%D0%B2-mod-rewrite)

> [Вы идёте неправильным путём](https://ru.stackoverflow.com/a/542870/200260)

###  Health Score

18

—

LowBetter than 8% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity33

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/9437b35b9443597f698ce24f3d4b38754196b43a94e34b42be715c4e08aa401a?d=identicon)[cronfy](/maintainers/cronfy)

---

Top Contributors

[![cronfy](https://avatars.githubusercontent.com/u/762954?v=4)](https://github.com/cronfy "cronfy (3 commits)")

### Embed Badge

![Health badge](/badges/cronfy-canonical/health.svg)

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

###  Alternatives

[icehouse-ventures/laravel-mermaid

Simple package to generate diagrams in Laravel using the Mermaid.js library

2630.0k](/packages/icehouse-ventures-laravel-mermaid)

PHPackages © 2026

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