WordPress.org

Ready to get started?Download WordPress

Forums

[resolved] Multisite Blogs images not showing (8 posts)

  1. SKco
    Member
    Posted 2 years ago #

    So I have been having a huge issue and cannot figure why I cannot get any images to show correctly in any of the blogs. They upload fine but the file path is incorrect when I click on them. Below you'll find my .htacess

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    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]
    </IfModule>
    
    # END WordPress

    I have looked all over online and cannot find anything that will work. This Multisite is an account on my Host Gator reseller account if that makes any difference.

    Thanks in advance.

  2. What's 'incorrect' about them?

    Sorry, but telling us 'it's wrong' without details is hard to debug ;)

    What filepaths are you getting?

    What are you expecting?

  3. They upload fine but the file path is incorrect when I click on them.

    by default the images are uploaded to blogs.dir/BLOG_ID/files/year/month/filename.jpg.

    The are rewritten to appear as /files/year/month/filename.jpg. That expected behaviour.

  4. SKco
    Member
    Posted 2 years ago #

    Sorry for being vague. I appreciate your help on this matter.
    When I upload an image the file path is
    http://dummytest.prettygoodlabel.com/files/2012/01/hd.png

    however, the image shows broken, meaning it says its there, but will not show up in the dashboard or on the site. When I type in the long path
    that I know the image is in I get the image.

    http://prettygoodlabel.com/wp-content/blogs.dir/9/files/2012/01/hd.png

    I am not sure if the issue is because of the subdomains or not.

    Thanks

  5. That location (http://dummytest.prettygoodlabel.com/files/2012/01/hd.png) is correct.

    See the line RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L] in your htaccess? That's supposed to translate that URL into the blogs.dir one (without changing the apparent URL, hence the [L] in there).

    When that stops happening, it means that your server's probably missing AllowOverride All in the httpd.conf for your account.

  6. SKco
    Member
    Posted 2 years ago #

    Ok they had me change my htacess to this

    # BEGIN WordPress
    <IfModule mod_rewrite.c>
    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]
    </IfModule>
    
    # END WordPress
    
    AllowOverride AuthConfig Indexes

    Problem still exists, images aren't showing up

  7. Problem still exists, images aren't showing up

    Did you tell your host that? It's still your server that needs adjusting.

  8. SKco
    Member
    Posted 2 years ago #

    OK, I really appreciate everyone's time on this, the host has fixed my problem.

Topic Closed

This topic has been closed to new replies.

About this Topic