How to fix 404 not found in Nginx of WordPress website

how to fix ?

it’s a really simple issues, just use rewrite function could be fix it.

the code will be like this.

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;

Leave a Reply

Your email address will not be published. Required fields are marked *