环境是LNMPA,可以直接用.htaccess去实现伪静态

.htaccess为

<IfModule mod_rewrite.c>`
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d
RewriteRule . /index.php [L]
</IfModule>

环境是LNMP,可以通过修改你站点的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;
    }

文章来源:更详细的pinghsu主题设置教程