重写url形成单一路口
在项目入口创建.htaccess文件,此文件是apache服务器的配置文件。
.htaccess
<IfModule mod_rewrite.c>
Options +FollowSymlinks -Multiviews
RewriteEngine On
RewriteCond %{
REQUEST_FILENAME} !-d
RewriteCond %{
REQUEST_FILENAME} !-f
RewriteRule ^(.*)$ index.php/$1 [QSA,PT,L]
</IfModule>