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.

Hi,

If I understand you question correct,

maybe this will help:

Forum thread with similar question:

http://www.yiiframework.com/forum/index.php/topic/56027-yii2-multilingual-website-url-rules/

The solution seems to be this extension:

Best Regards

Thanks it helped!

:)