Media uploads work on root site of subdir multisite, but not child sites
-
I setup a Network using subsites a while ago, but didn’t start using it till recently. However I did upgrade from 3.0 to 3.1.2 before trying uploads.
Access to the sites works fine. However, uploaded media files are not appearing on child sites, although they appear in the file system. Uploaded media works fine for the root site.
E.g. subsite: https://blogs.ddict.co.uk/garden
Uploaded a file. It appears in file system at/home/dunx/www/wp_multi/wp-content/blogs.dir/7/files/2011/05/dunxPainting-weeer.jpg
. It can be accessed directly at https://blogs.ddict.co.uk/wp-content/blogs.dir/7/files/2011/05/dunxPainting-weeer.jpg. This shows that the upload mechanism and permissions are set fine. However, WordPress expects the file to be accessed at https://blogs.ddict.co.uk/garden/files/2011/05/dunxPainting-weeer.jpg which is returning nothing at all.So I suspect something is not right with the rewrite rules in .htaccess:
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]
These rules don’t reference blogs.dir, so I suspect they may be wrong. Can anyone put me in the right direction?
- The topic ‘Media uploads work on root site of subdir multisite, but not child sites’ is closed to new replies.