wordpress二级目录站点伪静态配置

wordpress yekong 571℃

wordpress需要将一个二级目录配置为一个子站点,伪静态需要做一下调整,不然无法访问到对应的二级目录站点。
php版本推荐7.2 之前使用的7.3版本无法正常访问二级站点不清楚是啥原因造成的。


location /  
{  
     try_files $uri $uri/ /index.php?$args;  
}  
  
rewrite /wp-admin$ $scheme://$host$uri/ permanent;  
  
  
location /blog/ {  
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 (.*) /blog/index.php;  
}  
}  
喜欢 (0)