The MU forums have moved to WordPress.org

Broken Images (8 posts)

  1. Nick_theGeek
    Member
    Posted 14 years ago #

    I am using WordPress MU 2.9.2. I had been using WordPress prior to this but I needed a multiblog environment and felt the single portal would be better than having to log into multiple blogs to make changes.

    I made a switch to a new server when I did this change so I have a fully fresh install. I am using vhosting and have setup a "*" subdomain through cpanel.

    Everything seems to be working except I cannot use images that are uploaded to any of the blogs I've setup. They get uploaded to the server, but show up as broken images. It seems like this is a problem with the redirect.

    I have checked my .htaccess file and I believe it is correct. I know of 2 other MU accounts on this server that aren't having this problem so it seems the server doesn't have a problem with the redirects.

    This is the content of the .htaccess file

    RewriteEngine On
    RewriteBase /
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
    
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ $1/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule . - [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(wp-.*) $2 [L]
    RewriteRule  ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>
  2. andrea_r
    Moderator
    Posted 14 years ago #

    Hey nick. :)

    It could be that mod_rewrite is not specifically being allowed to read the htaccess in that particular folder (the one where MU is installed).

    AllowOverride FileInfo Options needs to be in the httpd.conf file for that web account.

    If that doesn't fix it let me know. The only other time I've seen it completely bork, cpanel, was stuffing a www in front of the image link.

  3. Nick_theGeek
    Member
    Posted 14 years ago #

    Andrea,

    Thanks for your help on this. You had pointed me in this direction in another forum (not sure about name dropping rules but they are great and you have been great) and I saw this solution before in another thread and that seemed to fix their problem. I kicked it up to the hosting service since I don't have access to httpd.conf at my level. I had asked before but I'm trying for specific confirmation.

    I'm not sure how to verify that cpanel is doing anything weird to the link. This is an example link to an image on the server.

    http://nickgeek.com/files/2010/03/Megan-in-the-snow-caveb.jpg

    Of course this isn't where the file is located, rather it is in

    /wp-content/blogs.dir/1/files/2010/03/Megan-in-the-snow-caveb.jpg

    I understand this is normal behavior and the reason for the redirects.

    I can manually put www. on the link and it will strip it off not add it, but it's hard to say what the server is doing, even if my browser says it isn't looking at www.

  4. Nick_theGeek
    Member
    Posted 14 years ago #

    Andrea, they specifically set that for this account and it still breaks the image links. So what is your other idea?

  5. andrea_r
    Moderator
    Posted 14 years ago #

    Well that was interesting. I went to this image:

    http://nickgeek.com/wp-content/uploads/lies.jpg

    And got a 500 internal server error.

    For the images that were uploaded previously, put them back in the "right" folder, like they were in single MU. No, it does not exist in MU, but it will keep the legacy images.

    Your posts are working right, so I know the htaccess works. have you created a member blog yet?

  6. Nick_theGeek
    Member
    Posted 14 years ago #

    Hey Andrea, I had created member blogs and they were working, then I deleted, reinstalled, imported my blog back in tried uploading images, same problem. Eventually we deleted the hosting account and set that back up since WPMU is working on this server. Reinstalled, same problem. Downloaded a fresh copy of WPMU, deleted it all, reinstalled ... it works.

    Something must have corrupted somewhere and broke in a really weird way. Thanks for the help, this is just one of those weird hiccups that seemed way more frustrating because it was behaving like it was supposed to in all but one way.

    Now I just need to get all my files installed for legacy, plugins, new files, ... oh the joys, but I'm really excited to be past the major hurdle.

  7. andrea_r
    Moderator
    Posted 14 years ago #

    Yeah, that IS a pain. :-/ No idea why everything else works except that one bit.

  8. riaritchey
    Member
    Posted 14 years ago #

    I had this exact same issue and solved it by checking out my permission settings on my folders.

    When installing it says to make your wp-content writable. Well for your images to work, at least mine, I had to switch this back to it's original settings.

    Perhaps others might have the same problem I did and this will help.

About this Topic

  • Started 14 years ago by Nick_theGeek
  • Latest reply from riaritchey