别名在虚拟主机中工作不正确

I have defined such virtual host on a local Apache server.

<VirtualHost *:80>
    ServerAdmin webmaster@dummy-host2.example.com
    DocumentRoot "c:/wamp/www/yii/frontend/web"
    <Directory "c:/wamp/www/yii/frontend/web">
    AllowOverride all
    Require all granted
    </Directory>
    Alias /admin "c:/wamp/www/yii/backend/web"
    <Directory "c:/wamp/www/yii/backend/web">
    AllowOverride all
    Require all granted
    </Directory>
    ServerName florist
    ErrorLog "logs/yii-error.log"
    CustomLog "logs/yii-access.log" common
</VirtualHost>

URL http://florist/admin works correctly and processed by /backend/web/index.php.

But URL http://florist/admin/login have processed by /frontend/web/index.php

I found this out when I placed exit() function with appropriate message in appropriate index.php

What's wrong may be in the alias?

I have created simlink to c:\wamp\www\yii\backend\web

mklink /D c:\wamp\www\yii\frontend\web\admin c:\wamp\www\yii\backend\web

and add Options FollowSymLinks in the virtual host definition. It's resolve a problem.

Try add .htaccess in admin subfolder:

Options +FollowSymLinks
IndexIgnore */*

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