Support » Networking WordPress » Images not showing in subsites

  • Resolved natolie

    (@natolie)


    Hi all, I read lots of stuff before writing here but I found no solutions to my problem yet. It deals with images in subsites on multisites WordPress ver. 3.0.1

    This is the scenario:

    1- running three sites on WordPress 3.0.1 with subfolders’ system;

    2- .htaccess is here:
    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).*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]

    3- wp-config.php contains:

    define( 'WP_ALLOW_MULTISITE', true );
    define( 'MULTISITE', true );
    define( 'SUBDOMAIN_INSTALL', false );
    $base = '/';
    define( 'DOMAIN_CURRENT_SITE', 'enriconatoli.net' );
    define( 'PATH_CURRENT_SITE', '/' );
    define( 'SITE_ID_CURRENT_SITE', 1 );
    define( 'BLOG_ID_CURRENT_SITE', 1 );

    4- The problem is:
    Images in the main site are shown properly while images in the subsites load properly but they are not shown but in the “edit” mode in the upload panel, else I have to manually change the address.
    This URL works:
    http://www.enriconatoli.net/wp-content/blogs.dir/3/files/filename.xxx
    This URL doesn’t work:
    http://www.enriconatoli.net/motoperpetuo/files/filename.xxx

    Following one of Andrea’s suggestions I contacted my host provider in order to make them add ‘AllowOverrideAll’ to Apache’s httpd.conf, but I had a negative response because of “security reasons on a shared server”, this is what they say.

    “Blogs.dir” folder and all its contents are set to 755 and WordPress is able to upload images in the right folders.

    I hope some of you can give me a hint about what else to try in order to make subsites’ images work.
    Thanks in advance,
    have you all a nice nice day.

    Enrico

Viewing 4 replies - 1 through 4 (of 4 total)
  • Thread Starter natolie

    (@natolie)

    Hi, while I am wondering wether I wrote somethimg wrong in posting the above (if that is the case I apologise) or not, here are some more elements.

    I tried to add to htaccess the following line that I found in another thread by Ipstenu:

    ‘RewriteRule ^wordpress/wp-content/blogs.dir/3/files/(.*)$ http://www.domainname.net/motoperpetuo/files/$2 [L,R=301]’

    It didn’t work so far.

    One more thing I discovered is that if I try to open:
    http://domainame/motoperpetuo/files/nome.png

    I get a “500 Internal server error”.

    Any help would be much appreciated.

    Again please let me know if I’m asking for help in the wrong way.

    Thanks all, have a nice day

    We’re still thinking of the answer – your questions are fine.

    Thread Starter natolie

    (@natolie)

    Ok, it seems I have come to a solution.
    Quite incredibly, the ms-files.php had the permissions set to 644. I don’t have a clue about how this is possible, my ftp software is not set to automatically change permissions to files. Anyway I tried to set it to 755 and that made it.

    I hope this thread may be useful to someone and I thank Andrea and all the staff for your support.

    Cool beans.

    I did double check this, and this should be a last-case scenario that only shows up on some shared servers where they have extra security precautions in place.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Images not showing in subsites’ is closed to new replies.