nginx设置wordpress伪静态规则

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;

 

发表评论

电子邮件地址不会被公开。 必填项已用*标注