Yii2 Home Breadcrumbs Wrong

For some reason the home url for breadcrumbs on my website is not correct: e.g. breadcrumbs - Home / Biometrics when I click on Home - I get (with 404 error) main / web / index.phpindex.php

How can I fix the home url to leave an additional index.php? I searched Yii2 app and site without help Thanks

+3


source to share


1 answer


I found an error on my layout master page

<?=
    Breadcrumbs::widget([
        'homeLink' => ['label' => 'Home',
        'url' => Yii::$app->getHomeUrl() . 'index.php?r=dashboard/index'],
        'links' => isset($this->params['breadcrumbs']) ? $this->params['breadcrumbs'] : [], 
    ]);
?>

      



Just omitted index.php and it works great - it always happens when I spend hours looking for that bit of code. Thanks for making me clarify ..

+4


source







All Articles