fedornabilkin/yii2-redirect

Find and save page not found, add new path.

Installs: 33

Dependents: 0

Suggesters: 0

Security: 0

Stars: 3

Watchers: 2

Forks: 1

Open Issues: 0

Type:yii2-extension

v0.0.3 2018-04-07 21:30 UTC

This package is auto-updated.

Last update: 2024-05-18 05:45:40 UTC


README

Latest Stable Version Downloads

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

yii2-redirect