I had installed Yii2 basic app and have a trouble this url. When I click in About in Navbar URL has the form
but I need URL like /basic.yii2/web/index.php?r=site/about
In layouts/main.php slash added currently:
<?php
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'items' => [
['label' => 'Home', 'url' => ['/site/index']],
['label' => 'About', 'url' => ['/site/about']],
['label' => 'Contact', 'url' => ['/site/contact']],
Yii::$app->user->isGuest ?
['label' => 'Login', 'url' => ['/site/login']] :
['label' => 'Logout (' . Yii::$app->user->identity->username . ')',
'url' => ['/site/logout'],
'linkOptions' => ['data-method' => 'post']],
],
]);
NavBar::end();
?>
And second question: how i can change url from /index.php?r=controller/action to [size="2"]/controller/action ?[/size]