Last active
August 29, 2015 14:14
-
-
Save yupe/93fb9d66a94d97bccf27 to your computer and use it in GitHub Desktop.
Yupe cms смена урлов панели управления
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
return [ | |
'component' => [ | |
'request' => [ | |
'class' => 'yupe\components\HttpRequest', | |
// пути, исключенные из csrf-валидации | |
'noCsrfValidationRoutes' => ['admin/AjaxImageUpload', 'admin/AjaxFileUpload'], | |
] | |
], | |
'rules' => [ | |
// старые пути к панели управления теперь отдают 404-ую ошибку | |
'/backend' => false, | |
'/backend/login' => false, | |
'/backend/<action:\w+>' => false, | |
'/backend/<module:\w+>/<controller:\w+>' => false, | |
'/backend/<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>' => false, | |
'/backend/<module:\w+>/<controller:\w+>/<action:\w+>' => false, | |
//csrf | |
'/backend/AjaxImageUpload' => false, | |
'/backend/AjaxFileUpload' => false, | |
// новые пути для панели управления | |
'/admin' => '/yupe/backend/index', | |
'/admin/login' => '/user/account/backendlogin', | |
'/admin/<action:\w+>' => '/yupe/backend/<action>', | |
'/admin/<module:\w+>/<controller:\w+>' => '/<module>/<controller>Backend/index', | |
'/admin/<module:\w+>/<controller:\w+>/<action:\w+>/<id:\d+>' => '/<module>/<controller>Backend/<action>', | |
'/admin/<module:\w+>/<controller:\w+>/<action:\w+>' => '/<module>/<controller>Backend/<action>', | |
] | |
]; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment