Problem with hiding controller name

I have urlManager set like this:

'urlManager' => [

    'enablePrettyUrl' => true,

    'showScriptName' => false,

    'rules' => [

        '<alias:\w+>' => 'site/<alias>',



.htaccess is inside my web directory:

RewriteEngine on

# If a directory or a file exists, use the request directly

RewriteCond %{REQUEST_FILENAME} !-f

RewriteCond %{REQUEST_FILENAME} !-d

# Otherwise forward the request to index.php

RewriteRule . index.php

apache default config is set like this:

<Directory /var/www/html>

    Options Indexes FollowSymLinks MultiViews

    AllowOverride All

    Order allow,deny

    allow from all


Visiting http://localhost/basic-yii/web/about works fine, but http://localhost/basic-yii/web/index throws an error:

Not Found

The requested URL /basic-yii/web/index was not found on this server.

Can someone help me with this ? What is the problem ?