wordpress非根目录部署nginx关键配置
在非根目录部署wordpress时/wp-json/wp/v2/posts
这样的rest Api会访问不了增加nginx配置(假设部署在wp文件夹下)location /wp { if (-f $request_filename/index.php) { rewrite (.*) /index.php; } if (!-f $request_filename){ rewrite ^/wp/(.*)$ /wp/index.php; } }
以上就是详解wordpress非根目录部署nginx关键配置的详细内容,
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)