I have 2 projects. First project is in the main domain and the second project is in a subdomain. When I click on a menu item to redirect from subdomain to main domain, it redirects me to: https://subdomain.maindomain.com/https://maindomain.com/
Code:
echo Nav::widget([
'options' => ['class' => 'navbar-nav navbar-right'],
'items' => [
['label' => 'Menu 1', 'url' => ['https://maindomain.com/']],
['label' => 'Menu 2', 'url' => ['https://maindomain.com/1']],
],
]);
So I need just redirect to https://maindomain.com/ when click to menu in subdomain project.
Try putting URL outside of brackets. e.g.:
['label' => 'Menu 1', 'url' => 'https://maindomain.com/'],