I am trying to change the paramlinks to include the name of a post in my yii2 application.
example.com/item/hello+world
to
example.com/item/hello-world
These are the rules of in my urlmanager in frontend/config/main.php
'urlManager' => [
'class' => 'yii\web\UrlManager',
'enablePrettyUrl' => true,
'showScriptName' => false,
'enableStrictParsing' => false,
'rules' => [
'/' => 'site/index',
'item/<title:[A-Za-z0-9 -_.]+>' => 'item/view',
],
]