Warning: file_get_contents(/data/phpspider/zhask/data//catemap/1/wordpress/12.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181

Warning: file_get_contents(/data/phpspider/zhask/data//catemap/8/.htaccess/5.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Wordpress 由于“;此网页有一个重定向循环”;错误_Wordpress_.htaccess_Magento_Redirect_Nginx - Fatal编程技术网

Wordpress 由于“;此网页有一个重定向循环”;错误

Wordpress 由于“;此网页有一个重定向循环”;错误,wordpress,.htaccess,magento,redirect,nginx,Wordpress,.htaccess,Magento,Redirect,Nginx,我在magento的根文件夹blog目录下有word press。此博客目录已从live站点复制到我的应用程序。(我在magento中使用fish pig magento扩展来集成word press) 在magento admin中,我已将“使用Web服务器重写”设置为“否” 我有以下路径的图像在前端 http://www.example.com/blog/wp-content/uploads/2014/05/blogimage-150x150.png 此图像存在于指定位置。目录和文件的文件

我在magento的根文件夹
blog
目录下有word press。此博客目录已从live站点复制到我的应用程序。(我在magento中使用fish pig magento扩展来集成word press)

在magento admin中,我已将“使用Web服务器重写”设置为“否”

我有以下路径的图像在前端

http://www.example.com/blog/wp-content/uploads/2014/05/blogimage-150x150.png
此图像存在于指定位置。目录和文件的文件权限为
777
。但图像在前端博客页面中不可见

当我在我的Chrome浏览器中手动输入此图像url时,我发现
此网页有一个重定向循环
错误。在里面

blog文件夹下的
.htaccess
文件只有这一行
DirectoryIndex.php

我也试过这些命令

UPDATE wp_posts SET guid = replace(guid, 'http://www.oldurl','http://www.newurl');

UPDATE wp_posts SET post_content = replace(post_content, 'http://www.oldurl', 'http://www.newurl');

UPDATE wp_postmeta SET meta_value = replace(meta_value,'http://www.oldurl','http://www.newurl');
该应用程序托管在nginx上

更新

如果我将图像放置在位置,我也无法访问该位置


如何修复此重定向循环,是否有人可以提供帮助?

此问题现已修复。我看了那只鱼猪的文件。安装指南中提到了这一点。如果您希望您的博客可以在上查看,请不要在名为blog的子目录中安装WordPress。因此,建议您将WordPress安装在名为wp的子目录中

在我的例子中,wordpress目录的名称和博客url都是相同的,即blog。当我将wordpress的目录名从blog更改为blogs,并在fishpig集成的管理下更改了相同的设置时。一切都很顺利

修理

如果您的wordpress的url为www.example.com/blog,那么目录结构应该如下所示

/var/www/
      app
      blogs (or something other than blog)

根文件夹中的htaccess包含哪些内容?
nginx
将不会解析您的htaccess@masegaloeh您的意思是说我没有得到@kristofeys Feys在magento roor中,或者我有magento的.htaccess文件,在blog文件夹中我有..htaccess包含此DirectoryIndex.phpEven有一个
.htaccess
在您的文件夹中,
nginx
不会在该文件中包含任何配置。换句话说,您的
.htaccess
nginx
环境中将毫无用处
/var/www/
      app
      blogs (or something other than blog)