I've two wp sites (multisite) with the following config:
1#
(Main site) Home: http:// www.mysite.com
Upload Path: wp-content/uploads
Fileupload Url: http:// www.mysite.com/wp-content/uploads
2#
Home: http:// www.mysite.com/en/
Upload Path: wp-content/blogs.dir/2/files
Fileupload Url: http:// www.mysite.com/en/files
My .htaccess has the following:
# BEGIN WordPress
RewriteEngine On
RewriteBase /
RewriteRule ^index\.php$ - [L]
# uploaded files
RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [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).*) $1 [L]
RewriteRule ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
RewriteRule . index.php [L]
# END WordPress
The first site is working 100%, i can upload images, view them on the media library & post edit and they show OK in the page
The second site, when I upload the image, it shows a broken image: https://i.sstatic.net/EsMg4.gif
But when I click the "edit image" button it shows OK: https://i.sstatic.net/5gMIH.gif
I've checked and the image is on the right folder (http: //www.mysite.com/blogs.dir/2/files/honey.jpg) but it's broken in the admin panel and the site. The url of the broken image is: http: //www.mysite.com/en/files/honey.jpg
I've lost hours trying to fix it through .htaccess and changing the wordpress config but nothing seems to work. Any ideas?
Thanks!