WordPress 如何去掉网址中的 index.php

两步即可,第一步在后台设置 - 固定链接 中的自定义结构删除 index.php

第一步在伪静态中选择 wordpress 规则:

如果使用的是虚拟主机,也是同样的方式,在虚拟主机控制面板中填写伪静态规则,提交即可:

location /
{
try_files $uri $uri/ /index.php?$args;
}

rewrite /wp-admin$ $scheme://$host$uri/ permanent;