This question has already been answered:

How to make links instead of the form

category / album? id = 10

View links -

category / album / 10

I understand you need to configure urlManager in the config, but how?

Reported as a duplicate by participants Alexey Shimansky , user194374, cheops , Bald , aleksandr barakin Jul 20 '16 at 6:05 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

1 answer 1

Maybe you will need someone

'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ '<controller:\w+>/<id:\d+>' => '<controller>/view', '<controller:\w+>/<action:\w+>/<id:\d+>' => '<controller>/<action>', '<controller:\w+>/<action:\w+>' => '<controller>/<action>', ], ], 
  • Only it will not work if you enablePrettyUrl => true ....... what is written in the answer I gave you - Alexey Shimansky
  • maybe it was so easy for me, before I did something - Vlad