06692811
Eugeny Galkovskiy
first commit
|
1
|
<?php
|
7c151ddb
Alexey Boroda
-Language redirec...
|
2
|
|
06692811
Eugeny Galkovskiy
first commit
|
3
4
|
use artbox\core\components\LanguageRequest;
use artbox\core\components\SeoUrlManager;
|
9dcc1288
Anastasia
redirect
|
5
|
use common\models\LangRedirect;
|
06692811
Eugeny Galkovskiy
first commit
|
6
7
|
$params = array_merge(
|
880d86c6
Timur Kastemirov
hernya 2
|
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
|
require( __DIR__ . '/../../common/config/params.php' ),
require( __DIR__ . '/../../common/config/params-local.php' ),
require( __DIR__ . '/params.php' ),
require( __DIR__ . '/params-local.php' )
);
return [
'id' => 'app-frontend',
'homeUrl' => '/',
'basePath' => dirname(__DIR__),
'bootstrap' => YII_ENV_PROD ? [
'log',
'assetsAutoCompress',
] : [ 'log' ],
'controllerNamespace' => 'frontend\controllers',
'components' => [
'request' => [
|
7c151ddb
Alexey Boroda
-Language redirec...
|
25
26
27
28
|
'class' => LanguageRequest::className(),
'dontShowDefaulPrefix' => true,
'csrfParam' => '_csrf-frontend',
'baseUrl' => '',
|
880d86c6
Timur Kastemirov
hernya 2
|
29
30
31
32
33
34
35
|
],
'user' => [
'identityClass' => 'common\models\User',
'enableAutoLogin' => true,
'identityCookie' => [
'name' => '_identity-frontend',
'httpOnly' => true,
|
06692811
Eugeny Galkovskiy
first commit
|
36
37
|
],
],
|
880d86c6
Timur Kastemirov
hernya 2
|
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
|
'session' => [
// this is the name of the session cookie used for login on the frontend
'name' => 'advanced-frontend',
],
'log' => [
'traceLevel' => YII_DEBUG ? 3 : 0,
'targets' => [
[
'class' => 'yii\log\FileTarget',
'levels' => [
'error',
'warning',
],
],
],
],
'errorHandler' => [
'errorAction' => 'site/error',
],
'urlManager' => [
|
9dcc1288
Anastasia
redirect
|
58
|
'baseUrl' => '/',
|
7c151ddb
Alexey Boroda
-Language redirec...
|
59
60
61
62
63
64
|
'class' => SeoUrlManager::className(),
'enablePrettyUrl' => true,
'forceRedirect' => true,
'showScriptName' => false,
'dontShowDefaulPrefix' => true,
'rules' => [
|
880d86c6
Timur Kastemirov
hernya 2
|
65
66
|
'\/robots.txt' => 'site/robots',
],
|
7c151ddb
Alexey Boroda
-Language redirec...
|
67
|
'processRoutes' => [
|
880d86c6
Timur Kastemirov
hernya 2
|
68
69
70
71
72
|
'object/view',
'blog/article',
'blog/tag',
'blog/category',
'page/view',
|
2a6bee80
Timur Kastemirov
seo for hardcoded...
|
73
74
75
76
77
78
79
|
'site/media-about',
'site/individual',
'blog/index',
'object/index',
'site/about',
'site/legal',
'site/contact',
|
7c151ddb
Alexey Boroda
-Language redirec...
|
80
|
|
880d86c6
Timur Kastemirov
hernya 2
|
81
|
],
|
9dcc1288
Anastasia
redirect
|
82
83
84
|
'redirects' => [
LangRedirect::className(),
],
|
06692811
Eugeny Galkovskiy
first commit
|
85
|
],
|
880d86c6
Timur Kastemirov
hernya 2
|
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
|
'assetsAutoCompress' => [
'class' => '\skeeks\yii2\assetsAuto\AssetsAutoCompressComponent',
'enabled' => true,
'readFileTimeout' => 3,
//Time in seconds for reading each asset file
'jsCompress' => true,
//Enable minification js in html code
'jsCompressFlaggedComments' => true,
//Cut comments during processing js
'cssCompress' => true,
//Enable minification css in html code
'cssFileCompile' => true,
//Turning association css files
'cssFileRemouteCompile' => false,
//Trying to get css files to which the specified path as the remote file, skchat him to her.
|
f0b509ac
Timur Kastemirov
css compress false
|
105
|
'cssFileCompress' => false,
|
880d86c6
Timur Kastemirov
hernya 2
|
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
|
//Enable compression and processing before being stored in the css file
'cssFileBottom' => false,
//Moving down the page css files
'cssFileBottomLoadOnJs' => false,
//Transfer css file down the page and uploading them using js
'jsFileCompile' => true,
//Turning association js files
'jsFileRemouteCompile' => false,
//Trying to get a js files to which the specified path as the remote file, skchat him to her.
'jsFileCompress' => true,
//Enable compression and processing js before saving a file
'jsFileCompressFlaggedComments' => true,
//Cut comments during processing js
'htmlCompress' => true,
//Enable compression html
'noIncludeJsFilesOnPjax' => true,
//Do not connect the js files when all pjax requests
'htmlCompressOptions' => //options for compressing output result
[
'extra' => false,
//use more compact algorithm
'no-comments' => true
//cut all the html comments
],
|
35f6909f
Timur Kastemirov
big shot #2 наши ...
|
132
|
],
|
06692811
Eugeny Galkovskiy
first commit
|
133
|
],
|
880d86c6
Timur Kastemirov
hernya 2
|
134
135
|
'params' => $params,
];
|