fedornabilkin / yii2-redirect
Find and save page not found, add new path.
Installs: 33
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 1
Forks: 1
Open Issues: 0
Type:yii2-extension
Requires
- yiisoft/yii2: ~2.0.0
This package is auto-updated.
Last update: 2025-03-18 07:44:06 UTC
README
Redirect manager, not found finder
Find and save page not found, add new path.
Installation
The preferred way to install this extension is through composer.
Either run
php composer.phar require --prefer-dist fedornabilkin/yii2-redirect "*"
or add
"fedornabilkin/yii2-redirect": "*"
to the require section of your composer.json
file.
Migrations
php yii migrate --migrationPath=@fedornabilkin/redirect/migrations
Settings
add backend config
'modules' => [ 'redirect' => [ 'class' => fedornabilkin\redirect\Module::class, 'frontendHost' => 'http://site.ru', // Go to page from admin panel ], ],
Usage
Add controller actions
public function actions() { return [ 'error' => [ 'class' => \fedornabilkin\redirect\actions\ErrorAction::class, ], ]; }
Manager path
You must restrict access to the controller!
/redirect/manager