<VirtualHost *:80>
DocumentRoot "D:\php\ThinkPHP\TP5.0\public"
ServerName www.chenhao.com
<Directory "D:\php\ThinkPHP\TP5.0\public">
Options FollowSymLinks
AllowOverride None
Order deny,allow
#Require all granted
Allow from all
</Directory>
</VirtualHost>
配置完之后能访问a.php可是访问index.php错误
需要在与index.php 同目录下添加.htaccess文件
.htaccess 文件内容
记得要开启apache的重写,否则不生效