2017 © Pedro Peláez
 

library www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

image

middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  • Wednesday, January 24, 2018
  • by oscarotero
  • Repository
  • 2 Watchers
  • 0 Stars
  • 40 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 7 Versions
  • 5 % Grown

The README.md

middlewares/www

Latest Version on Packagist ![Software License][ico-license] Testing ![Total Downloads][ico-downloads], (*1)

Middleware to add or remove the www subdomain in the host uri and returns a redirect response. The following types of hosts wont be changed:, (*2)

  • The one word hosts, for example: http://localhost.
  • The ip based hosts, for example: http://0.0.0.0.

Requirements

Installation

This package is installable and autoloadable via Composer as middlewares/www., (*3)

composer require middlewares/www

Usage

Set true to add the www subdomain and false to remove it., (*4)

//Remove www
$www = new Middlewares\Www(false);

//Add www
$www = new Middlewares\Www(true);

Optionally, you can provide a Psr\Http\Message\ResponseFactoryInterface as the second argument to create the redirect response (301). If it's not defined, Middleware\Utils\Factory will be used to detect it automatically., (*5)

$responseFactory = new MyOwnResponseFactory();

$www = new Middlewares\Www(true, $responseFactory);

Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details., (*6)

The MIT License (MIT). Please see LICENSE for more information., (*7)

The Versions

24/01 2018

dev-master

9999999-dev https://github.com/middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http psr-15 www

24/01 2018

v1.0.0

1.0.0.0 https://github.com/middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http psr-15 www

13/11 2017

v0.5.0

0.5.0.0 https://github.com/middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http psr-15 www

21/09 2017

v0.4.0

0.4.0.0 https://github.com/middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http psr-15 www

26/12 2016

v0.3.0

0.3.0.0 https://github.com/middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http psr-15 www

22/11 2016

v0.2.0

0.2.0.0 https://github.com/middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http psr-15 www

08/10 2016

v0.1.0

0.1.0.0 https://github.com/middlewares/www

Middleware to add or remove the www subdomain in the host uri and returns a redirect response

  Sources   Download

MIT

The Requires

 

The Development Requires

middleware psr-7 http psr-15 www