wordpress 404 problem after changing fixed link under nginx

Nginx – WordPress.org Documentation

Many sayings on the Internet are:

location / {
    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;

However, some themes may have problems and can be modified as:

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

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

 

Guess you like

Origin blog.csdn.net/chaishen10000/article/details/132228459