打开Nginx的配置文件nginx.conf,在server{}里面添加代码(代码只适用于Nginx服务器)
location / { index index.html index.php; if (-f $request_filename/index.html){ rewrite (.*) $1/index.html break; } if (-f $request_filename/index.php){ rewrite (.*) $1/index.php; } if (!-f $request_filename){ rewrite (.*) /index.php; } } rewrite /wp-admin$ $scheme://$host$uri/ permanent;
WordPress 固定链接-自定义结构导致文章404
- Tz
- 0