alex-kish / yii2-redirect-manager
Yii 2 URL redirect manager
Installs: 1
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 2
Forks: 0
Open Issues: 0
Type:yii2-extension
Requires
- php: >=7.4.0
- yiisoft/yii2: 2.0.*
This package is auto-updated.
Last update: 2024-05-13 01:28:47 UTC
README
RedirectManager - if you need to redirect the user from one page to another. Like UrlManager, but redirect.
REQUIREMENTS
The minimum requirement by this project template that your Web server supports PHP 7.4.
INSTALLATION
The preferred way to install this extension is through composer:
composer require alex-kish/yii2-redirect-manager:"*"
CONFIGURATION
To use this extension, you have to configure the RedirectManager class in your application configuration:
return [ //.... 'bootstrap' => ['redirectManager'], //.... 'components' => [ 'redirectManager' => [ 'class' => alexKish\redirectManager\RedirectManager::class, 'rules' => [ '/from-1' => '/to-1', '/from-2' => '/to-2', [ 'from' => '/from-3', 'to' => '/to-3', 'statusCode' => alexKish\redirectManager\RedirectRule::REDIRECT_STATUS_CODE_MOVED_TEMPORARILY ], ], ], ] ];