2017 © Pedro Peláez
 

library canonical

Canonical origin solver

image

cronfy/canonical

Canonical origin solver

  • Friday, January 5, 2018
  • by cronfy
  • Repository
  • 1 Watchers
  • 0 Stars
  • 22 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 1 Versions
  • 10 % Grown

The README.md

Redirect to canonical domain name/scheme

Provides framework agnostic redirects to canonical host/scheme without .htaccess., (*1)

Example:, (*2)

$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:, (*3)

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

Installation

composer require cronfy/canonical dev-master

SO Как сделать всё и сразу в mod_rewrite?, (*4)

Вы идёте неправильным путём, (*5)

The Versions

05/01 2018

dev-master

9999999-dev

Canonical origin solver

  Sources   Download

BSD-3-Clause

The Requires

  • php >=5.4.0