Fixes #5745: Gii and debug modules may cause 404 exception when the route contains dashes

This commit is contained in:
Qiang Xue
2014-10-24 08:01:35 -04:00
parent 2544e86d2c
commit a153750efe
5 changed files with 6 additions and 3 deletions

View File

@@ -124,7 +124,7 @@ class Module extends \yii\base\Module implements BootstrapInterface
$app->getUrlManager()->addRules([
$this->id => $this->id,
$this->id . '/<controller:\w+>/<action:\w+>' => $this->id . '/<controller>/<action>',
$this->id . '/<controller:[\w\-]+>/<action:[\w\-]+>' => $this->id . '/<controller>/<action>',
], false);
}