Adding prefix to url

I would like to add language to my url. Now I have url htt[p]://newshop/web/ so I’d like to change it to htt[p]://newshop/web/ru when the site is loading. Is it possible?

.htaccess in folder web:

RewriteEngine on

# If a directory or a file exists, use it directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# Otherwise forward it to index.php

RewriteRule . index.php

urlManager in config/web.php:

'urlManager' => [

            'enablePrettyUrl' => true,

            'showScriptName' => false


Any suggestions would be appreciated.


If I understand you question correct,

maybe this will help:

Forum thread with similar question:

The solution seems to be this extension:

Best Regards

Thanks it helped!