WordPress.org

Ready to get started?Download WordPress

Forums

Already uploaded images don't display after upgrade (7 posts)

  1. thebostonian
    Member
    Posted 3 years ago #

    This has me scratching my head three days now,

    Images on my multisite, example my logo have stopped showing up, and appear as broken images with chrome (red x's) .

    I right click and grabbed the URL to see if the file exists in the ftp and it does , any ideas what may be at fault here?

    Thanks!

  2. dgilmour
    Member
    Posted 3 years ago #

    When you look for the image via FTP, you're bypassing the URL rewrite rules, specified in your .htaccess file. They should translate the virtual URL used by WordPress to the physical address of the uploaded image, but that's failing. It sounds like something's wrong with those rules, or elsewhere in the rewrite process.

  3. thebostonian
    Member
    Posted 3 years ago #

    Thank you for your answer, here's my .htaccess, does it look right in your opinion?

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

    if I check for the image in the format http://www.domain.com/files/2011/02/banner.png it shows up fine.

    [No bumping, please.]

  4. That;s the URL you're supposed to be using. Can you give us an example bad URL?

  5. massayoshi
    Member
    Posted 3 years ago #

    I'm having the same issue. And created this topic here.

    I'm subscribing here in case you find a solution.

  6. thebostonian
    Member
    Posted 3 years ago #

    I fixed it by changing my htaccess to :

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

    Hope it helps !

  7. massayoshi
    Member
    Posted 3 years ago #

    Didn't work. Purged all the cache just to make sure, but I'm still getting the same error.

    Thanks anyway.

Topic Closed

This topic has been closed to new replies.

About this Topic