problem with pretty url

[font="Times New Roman"][size="3"]I create .htaccess file in /advanced/frontend/web and write below code in this file:[/size][/font]

[font="Times New Roman"][size="3"][color="#ff0000"]# if a directory or a file exists, use the request directly[/color][/size][/font]

[font="Times New Roman"][size="3"][color="#ff0000"]# otherwise forward the request to index.php[/color][/size][/font]

[font="Times New Roman"][size="3"][color="#ff0000"]RewriteCond %{REQUEST_FILENAME} !-f[/color][/size][/font]

[font="Times New Roman"][size="3"][color="#ff0000"]RewriteCond %{REQUEST_FILENAME} !-d[/color][/size][/font]

[font="Times New Roman"][size="3"][color="#ff0000"]RewriteRule . index.php[/color][/size][/font][font="Times New Roman"] [/font]

[font="Times New Roman"][size="3"]Then I go to /advanced/common/main-local.php and go to component section and write below code:[/size][/font]

[font=“Times New Roman”][color="#ff0000"][size=“2”]‘urlManager’ => [[/size][/color][/font]

[font=“Times New Roman”][color="#ff0000"][size=“2”] ‘enablePrettyUrl’ => true,[/size][/color][/font]

[font=“Times New Roman”][color="#ff0000"][size=“2”] ‘enableStrictParsing’ => true,[/size][/color][/font]

[font=“Times New Roman”][color="#ff0000"][size=“2”] ‘showScriptName’ => false,[/size][/color][/font]

[font="Times New Roman"][color="#ff0000"][size="2"] ],[/size][/color][/font][font="Times New Roman"] [/font]

[font="Times New Roman"][size="3"]But when I run my action in browser,the below error is showed to me:[/size][/font]

[font="Times New Roman"][size="3"][color="#ff0000"]The requested URL /site/about was not found on this server.[/color][/size][/font]

[font="Times New Roman"][size="3"]Please help to me how to work with pretty url in Yii2?[/size][/font]


'enableStrictParsing' => true,

Means you have to define rules for each route. No automatic controller/action would work.