On the hosting is installed yii2-basic , installed not in the root, but in htdocs/basic .
I want to replace http://домен/basic/web/about with http://домен/basic/about .
At the moment, the last address redirects to the main page.
In basic lies the following .htaccess :
<IfModule mod_rewrite.c> Options +FollowSymlinks RewriteEngine On </IfModule> <IfModule mod_rewrite.c> RewriteCond %{REQUEST_URI} ^/.* RewriteRule ^(.*)$ web/$1 [L] RewriteCond %{REQUEST_URI} !^/web/ RewriteCond %{REQUEST_FILENAME} !-f [OR] RewriteCond %{REQUEST_FILENAME} !-d RewriteRule ^.*$ web/index.php </IfModule> In basic/web there is also .htaccess :
RewriteCond %{REQUEST_FILENAME} !-f RewriteCond %{REQUEST_FILENAME} !-d RewriteRule . index.php In config/web.php :
'urlManager' => [ 'enablePrettyUrl' => true, 'showScriptName' => false, 'rules' => [ '' => 'site/index', '<action>'=>'site/<action>', ], ], In 'request' adding 'baseUrl' => '' gives 404.

'basic/about' => 'basic/web/about'- Alexey'basic/web/about' => 'basic/about', but it doesn't work ( - Tarasovych