You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

50 lines
1.9 KiB

7 years ago
<?php
/** @var array $params */
return [
'class' => 'yii\web\UrlManager',
'hostInfo' => $params['frontendHostInfo'],
'baseUrl' => '',
7 years ago
//'suffix' => '/',
7 years ago
'enablePrettyUrl' => true,
'showScriptName' => false,
'cache' => false,
'rules' => [
'' => 'site/index',
'contact' => 'contact/index',
'signup' => 'auth/signup/request',
'signup/<_a:[\w-]+>' => 'auth/signup/<_a>',
'<_a:login|logout>' => 'auth/auth/<_a>',
//['pattern' => 'yandex-market', 'route' => 'market/index', 'suffix' => '.xml'],
//['pattern' => 'sitemap', 'route' => 'sitemap/index', 'suffix' => '.xml'],
//['pattern' => 'sitemap-<target:[a-z-]+>-<start:\d+>', 'route' => 'sitemap/<target>', 'suffix' => '.xml'],
//['pattern' => 'sitemap-<target:[a-z-]+>', 'route' => 'sitemap/<target>', 'suffix' => '.xml'],
//'blog' => 'blog/post/index',
//'blog/tag/<slug:[\w\-]+>' => 'blog/post/tag',
//'blog/<id:\d+>' => 'blog/post/post',
//'blog/<id:\d+>/comment' => 'blog/post/comment',
//'blog/<slug:[\w\-]+>' => 'blog/post/category',
/*'cabinet' => 'cabinet/default/index',
'cabinet/<_c:[\w\-]+>' => 'cabinet/<_c>/index',
'cabinet/<_c:[\w\-]+>/<id:\d+>' => 'cabinet/<_c>/view',
'cabinet/<_c:[\w\-]+>/<_a:[\w-]+>' => 'cabinet/<_c>/<_a>',
'cabinet/<_c:[\w\-]+>/<id:\d+>/<_a:[\w\-]+>' => 'cabinet/<_c>/<_a>',*/
//'post/<_c:[\w\-]+>' => 'post/',
7 years ago
/* ['class' => 'frontend\urls\PostMainUrlRule'],
7 years ago
['class' => 'frontend\urls\PostUrlRule'],
['class' => 'frontend\urls\PostCategoryUrlRule'],
7 years ago
['class' => 'frontend\urls\PageUrlRule'],*/
7 years ago
7 years ago
/* Moved to end bootstrap - SetUp.php
7 years ago
'<_c:[\w\-]+>' => '<_c>/index',
'<_c:[\w\-]+>/<id:\d+>' => '<_c>/view',
'<_c:[\w\-]+>/<_a:[\w-]+>' => '<_c>/<_a>',
7 years ago
'<_c:[\w\-]+>/<id:\d+>/<_a:[\w\-]+>' => '<_c>/<_a>',*/
7 years ago
],
];