移动服务器后丢失图像

时间:2014-11-18 作者:Rick

我克隆了一个继承的WP Multisite,并在thisthis 前面的问题。除了图像,一切都在发展。

Missing Images

在其中一个子博客上,没有显示内容帖子中的图像。例如,我有<img title="CNDP Pic" src="http://192.168.33.10/study/files/2012/06/C123-Pic.png" alt="Pic" width="150" height="108">. 但是,浏览器找不到此文件。

enter image description here

Found in the file system

但是,我确实在文件系统上看到了此文件。 vagrant@vagrant-ubuntu-trusty-64:/var/www$ find | grep C123-Pic.png ./wp-content/blogs.dir/18/files/2012/06/C123-Pic.png

Database looks okayenter image description here

htaccess

RewriteEngine On
RewriteBase /
RewriteRule ^index\\.php$ - [L]

# add a trailing slash to /wp-admin
RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]

RewriteCond %{REQUEST_FILENAME} -f [OR]
RewriteCond %{REQUEST_FILENAME} -d
RewriteRule ^ - [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\\.php)$ $2 [L]
RewriteRule . index.php [L]
How to remap?数据库中是否有可以更正此映射的区域/study/files/2012/06/ = /wp-content/blogs.dir/18/files/2012/06/)?

1 个回复
SO网友:Rick

结果是。htaccess缺少以下行

# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

结束