我安装了yii2-user。在登录视图中,表单底部有几个链接。
<?= Html::a(Yii::t('user', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>
和
<?= Html::a(Yii::t('user', 'Didn\'t receive confirmation message?'), ['/user/registration/resend']) ?>
当我单击这些链接中的任何一个时,会删除 URL 的注册部分。所以我留下了一个找不到的页面。它会把我送到
http://localhost/webs/parlay/web/index.php/user/resend
而不是把我送到
http://localhost/webs/parlay/web/index.php/user/registration/resend
这是我的 urlManager 配置。
'urlManager' => [
'class' => 'yii\web\UrlManager',
// Disable index.php
'showScriptName' => true,
// Disable r= routes
'enablePrettyUrl' => true,
'rules' => array(
'<controller:\w+>/<id:\d+>' => '<controller>/view',
'<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>',
'<controller:\w+>/<action:\w+>' => '<controller>/<action>',
),
],