Uploaded images not showing on WP 4.3 subdomain multisite
-
Problem: Uploaded images are not being shown in posts and pages. Upload is successful. But the thumbnail shown after upload is over shows a broken image icon. When the published page is viewed, the image is missing. When the image is displayed through the url on the page
https://myurl/files/2015/09/service-matters-header.png
, it does not show. However when the full url is shownhttps://service.drjoel.in/wp-content/blogs.dir/8/files/2015/09/service-matters-header.png
, it displays properly.Details about my system:
Debian 8.2 VPS running apache2 webserver
Wordpress Multisite (subdomain)I suspected this to be a .htaccess issue. I tried the following variations of .htaccess in my webfolder, but the effects continue:
Original:
<ifModule mod_headers.c> Header set X-XSS-Protection "1; mode=block" Header always append X-Frame-Options SAMEORIGIN Header set X-Content-Type-Options: "nosniff” </ifModule> RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L]
Other:
# BEGIN WordPress RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # uploaded files RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule . index.php [L] # END WordPress
And
RewriteEngine On RewriteBase / RewriteRule ^index\.php$ - [L] # add a trailing slash to /wp-admin RewriteRule ^wp-admin$ wp-admin/ [R=301,L] RewriteCond %{REQUEST_FILENAME} -f [OR] RewriteCond %{REQUEST_FILENAME} -d RewriteRule ^ - [L] RewriteRule ^(wp-(content|admin|includes).*) $1 [L] RewriteRule ^(.*\.php)$ wp/$1 [L] RewriteRule . index.php [L]
What could be wrong?
- The topic ‘Uploaded images not showing on WP 4.3 subdomain multisite’ is closed to new replies.