<Directory "/wamp/www/basic/">
AllowOverride All
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 ^(.*)$ web/index.php
</Directory>
在Yii2中访问一个action需要的完整地址如下所示:http://localhost/basic/web/index.php?r=news/index。1、首先打开 basic\config\web.php页面,2、在components节点下添加 urlManager节点。3、在urlManager节点下添加两个值'urlManager' =>[ 'e