1. apache 的 httpd-vhost.conf
<VirtualHost *:80>
ServerName cucumber
DocumentRoot E:/cucumber/web
<Directory "E:/cucumber/web/">
Options +Indexes +Includes +FollowSymLinks +MultiViews
AllowOverride All
Require all granted
</Directory>
</VirtualHost>
2. 在与index.php文件同级目录(web目录)下添加文件“.htaccess”
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