Middleware to add or remove the www subdomain in the host uri and returns a redirect response
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:
- The one word hosts, for example:
- The ip based hosts, for example:
This package is installable and autoloadable via Composer as middlewares/www.
composer require middlewares/www
$dispatcher = new Dispatcher([ new Middlewares\Www(false) ]); $response = $dispatcher->dispatch(new ServerRequest());
true to add the www subdomain and
false to remove it.
The MIT License (MIT). Please see LICENSE for more information.