R
R
rusline2017-02-12 10:47:47
Yii
rusline, 2017-02-12 10:47:47

Why doesn't the path in the yii2 file work?

I don’t understand what’s wrong, I’m compiling the path in the standard yii2 template, but for some reason it doesn’t work
in the menu.php file

$menuItems = [
        ['label' => 'Feedback', 'url' => ['/site/feedback']],
    ];
did not change anything else in this file.
In the controller, I added this SiteController.php file
public function actionFeddback()
    {
        return $this->render("feedback");
    }

But when you click on the feedback link, you get this Not Found (#404)
Page not found page.
Although the file is already in the site folder. Who will tell you what's going on?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
Dmitry, 2017-02-12
@rusline

Good morning.
Show urlManager rules from config file.
And again, write where the file is located, what controller is used? Do you have mod_rewrite enabled? How is .htaccess configured from the web?

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question