krisell/redirect-www-middleware

Redirects all requests using www to non www.

Maintainers

Package info

github.com/Krisell/redirect-www-middleware

pkg:composer/krisell/redirect-www-middleware

Statistics

Installs: 500

Dependents: 0

Suggesters: 0

Stars: 0

Open Issues: 0

1.0.2 2019-09-08 14:06 UTC

This package is auto-updated.

Last update: 2026-03-09 04:38:08 UTC


README

Build Status

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