S
S
Sergey2015-03-04 00:35:06
Yii
Sergey, 2015-03-04 00:35:06

How to connect pretty url in yii2?

I write in config/web.php

'urlManager' => [
            'enablePrettyUrl' => true,
            'showScriptName' => false,
            'enableStrictParsing' => true,
            'rules' => [
                // ...
            ],
        ],

And the pages begin to be built in the address bar in the desired form. But at the same time they get 404 errors.
It seems that a .htaccess file is also needed, but where can I get it?
I can't find anything in the documentation about this.
What am I doing wrong?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
P
Puma Thailand, 2015-03-04
@opium

for Basic template you can look at the official guide
www.yiiframework.com/doc-2.0/guide-tutorial-shared...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question