nginx 配置.conf文件
if (-f $request_filename/index.html){rewrite (.*) $1/index.html break;}
if (-f $request_filename/index.php){rewrite (.*) $1/index.php;}
if (!-e $request_filename){rewrite (.*) /index.php;}
apache 配置.htaccess文件
<IfModule mod_rewrite.c>RewriteEngine OnRewriteBase /RewriteCond %{REQUEST_FILENAME} !-fRewriteCond %{REQUEST_FILENAME} !-dRewriteRule ^(.*)$ index.php [L,E=PATH_INFO:$1]</IfModule>