The MU forums have moved to WordPress.org

images cann't display (9 posts)

  1. Ninjai
    Member
    Posted 15 years ago #

    after upgrade 1.3 to 1.5, not sure it's a upgrade problem, I haven't do a backup, images now can only display as a text, after search the web, I still cann't find the answer
    the blog entry: http://bbfhome.com/mu/club/2008/05/08/%e7%88%ac%e5%b1%b1/
    and the image link: http://bbfhome.com/mu/club/files/2008/05/3.jpg
    like:
    .htaccess
    readfile() in blog.php

    the link is correct, but only display as a text, strange, why?

  2. Ninjai
    Member
    Posted 15 years ago #

    interesting, i just found out this image link http://bbfhome.com/mu/club/files/2008/05/3.jpg display the link text as a image which formerly I thought is text...

  3. tdjcbe
    Member
    Posted 15 years ago #

    the link is correct

    Does that mean the file is actually there?

    Anything in the error logs?

    http://codex.wordpress.org/Debugging_WPMU

  4. Ninjai
    Member
    Posted 15 years ago #

    yes, the file is actually there, if it is a broken link, like this one: http://bbfhome.com/mu/club/files/2008/05/2.jpg , the response is correct "404 — File not found."

    there is no error logs only access logs, and http response 304 or 200.

    124.114.169.170 - - [01/Jun/2008:15:11:52 +0800] "GET /mu/club/files/2008/05/3.jpg HTTP/1.1" 304 1 "http://bbfhome.com/mu/club/2008/05/08/%e7%88%ac%e5%b1%b1/" "Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"
    124.114.169.170 - - [01/Jun/2008:14:59:26 +0800] "GET /mu/club/files/2008/05/3.jpg HTTP/1.1" 200 172869 "http://bbfhome.com/mu/club/" "Mozilla/5.0 (Windows; U; Windows NT 6.0; zh-CN; rv:1.8.1.14) Gecko/20080404 Firefox/2.0.0.14"

  5. leviputna
    Member
    Posted 15 years ago #

    Are these two lines correct in your .htacess?

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]

    it seems that the file path is being redirected to wp-content/blogs.php correctly, maybe there is a problem with that file try replacing it with a new one.

  6. leviputna
    Member
    Posted 15 years ago #

    Ninjai: can I ask how you got your images working?

  7. lalomarquez
    Member
    Posted 15 years ago #

    Just a quick note: It seems it's not just a thing to put the code in any order. You need to put it IN THE CORRECT ORDER. I had this problem for two weeks until the helpful guys of tech support at my hosting in icdsoft helped me today by changing how the lines of code appear in .htaccess file so the files part runs first that the article and blog redirection. Check if your htaccess file is in the following order:

    Options +FollowSymLinks
    RewriteEngine On
    RewriteBase /
    
    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [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]
    
    # add a trailing slash to /wp-admin
    RewriteCond %{REQUEST_URI} ^.*/wp-admin$
    RewriteRule ^(.+)$ /$1/ [R=301,L]
  8. Ninjai
    Member
    Posted 15 years ago #

    actually, it happen again when I transfer MU to another host.

    to leviputna: I once fix this problem by repalceing all the files and maybe reinstalled, I don't know. I thought that it's random, but now it seems not.

    to lalomarquez: the order does not change a thing.

  9. Ninjai
    Member
    Posted 15 years ago #

    that's crazy, I even found that pic itself already transfered to the broswer, just the file is corrupted so it can't display...

About this Topic