Find and save page not found, add new path.
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.
php yii migrate --migrationPath=@fedornabilkin/redirect/migrations
add backend config
'modules' => [
'redirect' => [
'class' => fedornabilkin\redirect\Module::class,
'frontendHost' => 'http://site.ru', // Go to page from admin panel
],
],
Add controller actions
public function actions()
{
return [
'error' => [
'class' => \fedornabilkin\redirect\actions\ErrorAction::class,
],
];
}
You must restrict access to the controller!
/redirect/manager