NGINX Wordpress在子目录中安装错误的脚本URL
在此处从Apache切换到NGINX:) 所以我有一个站点,它位于根目录NGINX Wordpress在子目录中安装错误的脚本URL,wordpress,nginx,subdirectory,Wordpress,Nginx,Subdirectory,在此处从Apache切换到NGINX:) 所以我有一个站点,它位于根目录http://test.fake.com/并且工作正常。我还有另一个Wordpress站点(B),它的根是http://test.fake.com/b/ B加载脚本和css之类的http://test.fake.com/test.fake.com/b/这当然是不正确的。当我尝试转到管理员时,如http://test.fake.com/wp-admin/我收到未指定输入文件。作为唯一输出,URL也更改为http://test.
http://test.fake.com/
并且工作正常。我还有另一个Wordpress站点(B),它的根是http://test.fake.com/b/
B加载脚本和css之类的http://test.fake.com/test.fake.com/b/
这当然是不正确的。当我尝试转到管理员时,如http://test.fake.com/wp-admin/
我收到未指定输入文件。
作为唯一输出,URL也更改为http://test.fake.com/test.fake.com/b/wp-login.php
这里是我的NGINX配置的一个片段,我认为问题出在这里,如果您需要更多信息,请告诉我,并对NGINX n00b:p保持温和
location /b {
try_files $uri $uri/ /b/index.php$args;
}
location / {
# Set try_files according WP architecture
try_files $uri $uri/ /index.php$args;
}
这里是B的wp配置文件的一个片段,我在这里设置URL
define('WP_HOME','http://test.fake.com/b');
define('WP_SITEURL','http:/test.fake.com/b');
我不知道错误在哪里:(
谢谢你的浏览!你在WP\u网站url
定义中有一个拼写错误-缺失/
,这很尴尬;我知道这一定是很明显很愚蠢的事情。谢谢你,保佑你的心!你在WP\u网站url定义中有一个拼写错误-缺失/
,这很尴尬;我知道你必须这样做e一些显而易见的愚蠢的事情。谢谢你,祝福你的心!