NGinx:
location / {
index index.html index.htm index.php;
try_files $uri $uri/ /index.php$is_args$args;
}
Apache:
Options +FollowSymLinks
IndexIgnore /
RewriteEngine on
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . index.phpaa
Yii2.0 URL美化功能Nginx与Apache配置文件
原文:https://www.cnblogs.com/xiaobingch/p/12464274.html