apache开启rewrite_module模块,
在项目根目录创建.htaccess文件,文件内容如下
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.html [L,E=PATH_INFO:$1]
</IfModule>