krisell / redirect-www-middleware
Redirects all requests using www to non www.
1.0.2
2019-09-08 14:06 UTC
Requires (Dev)
- orchestra/testbench: ^3.5
- phpunit/phpunit: ^8.2
This package is auto-updated.
Last update: 2024-11-09 01:56:04 UTC
README
Redirect WWW Middleware for Laravel
Provides a middleware which redirects all requests made to the www subdomain to the main domain. If possible, perform the redirect before the request hits your appliction instead of using this middleware (e.g. in Nginx, Apache or IIS config).
Installation
composer require krisell/redirect-www-middleware
Usage
Register the middleware in App\Http\Kernel
protected $middleware = [ ..., \Krisell\RedirectWWWMiddleware\Http\Middleware\RedirectWWW::class, ..., ];
License
MIT