Apache和Nginx配置默认访问index.php

Apache:

.htaccess文件配置

Options +FollowSymLinks
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-d
RewriteCond %{REQUEST_FILENAME} !-f
RewriteRule ^ index.php [L]

Nginx:

location  / {

  try_files $uri $uri/ /index.php?$args;

}
原文地址:https://www.cnblogs.com/jackzhuo/p/11890283.html