PHP code example of rekurzia / yii2-redirect
1. Go to this page and download the library: Download rekurzia/yii2-redirect library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
rekurzia / yii2-redirect example snippets
(new Rekurzia\redirect\Application($config))->run();
$config['redirectRoutes'] = [
'some/route' => ['/site/index'],
'another/route' => ['/site/index', 'page' => 'another'],
'some/route?a=b&c=d' => ['/site/index', 'page' => 'abcd'],
'outside/route' => 'http://www.yiiframework.com',
];