File: /home/safarimaris/home/safarimaris/console/config/main.php
<?php
$params = array_merge(
require(__DIR__ . '/../../common/config/params.php'),
require(__DIR__ . '/../../common/config/params-local.php'),
require(__DIR__ . '/params.php'),
require(__DIR__ . '/params-local.php')
);
const FRONT_URL = 'https://safarimaris.com/';
return [
'id' => 'app-console',
'basePath' => dirname(__DIR__),
'bootstrap' => ['log'],
'controllerNamespace' => 'console\controllers',
'aliases' => [
'@imgPath' => dirname(__DIR__).'/../frontend/web/images/',
'@imgUrl' => FRONT_URL.'images',
'@web' => dirname(__DIR__).'/../frontend/web/',
],
'components' => [
'log' => [
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => ['error', 'warning'],
],
],
],
'urlManager' => [
'baseUrl' => FRONT_URL,
'enablePrettyUrl' => true,
'showScriptName' => false,
'rules' => [
'about' => 'static/about',
'<country>/sights/<url:[a-zA-Z0-9_\-]+>/' => 'sights/show',
'<country>/<url:[a-zA-Z0-9_\-]+>/' => 'entity/show',
'<url:[a-zA-Z0-9_\-]+>' => 'country/show',
],
],
],
'params' => $params,
];