Download the PHP package ymigval/laravel-wwwprotocolresolver without Composer
On this page you can find all versions of the php package ymigval/laravel-wwwprotocolresolver. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download ymigval/laravel-wwwprotocolresolver
More information about ymigval/laravel-wwwprotocolresolver
Files in ymigval/laravel-wwwprotocolresolver
Package laravel-wwwprotocolresolver
Short Description A Laravel package for redirecting responses with or without www and with the specified protocol (http or https).
License MIT
Homepage https://github.com/ymigval/laravel-wwwprotocolresolver
Informations about the package laravel-wwwprotocolresolver
Laravel WWW Protocol Resolver
The "laravel-wwwprotocolresolver" package provides easy configuration for redirecting responses with or without "www" and with the specified protocol (http or https) in Laravel applications. You can customize the redirection type (permanent or temporary), scheme (http or https), and redirection mode (with or without "www") according to your needs.
Installation
To install the package, run the following command in your Laravel project's terminal:
Publish configuration file (optional)
If you want to customize the package configuration, you can publish the configuration file using the following command:
Usage
To use the package, simply add the following environment variables to your .env file:
Ensure that you set these configurations only in production environments to avoid unwanted redirections during development.
Configuration
You can adjust the package configuration in the config/wwwprotocolresolver.php
file. Here, you can define the redirection type (301 or 302), scheme (http or https), and redirection mode (with or without "www") according to your preferences.
This package allows you to enhance the security and consistency of your URLs by ensuring that all users are redirected to the preferred version of your website.
Changelog
Please refer to the CHANGELOG for more information about recent changes.
License
The MIT License (MIT). For more information, please see the License File.