Forums

[resolved] Still no images appearing after trying everything (13 posts)

  1. jmwebguy
    Member
    Posted 1 year ago #

    Just upgraded WPMU the other day. I have checked the .htaccess and everything else in every post I can find. I can upload images into posts and they DO go into the correct blogs.dir files folder. But, when I am viewing the POST itself, logged in or not, the image does not show.
    Blog:
    http://cordillerablogs.com/jmwebguy/2010/11/12/testing-images/

    The image url is: http://cordillerablogs.com/jmwebguy/files/2010/11/sports-300x185.jpg but it does not appear.

    The image IS located in this folder: blogs.dir/2/files/2010/11/sports-300x185.jpg

    HTACCESS:
    RewriteEngine On
    RewriteBase /

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*

    RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.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>

    What other things should I be looking at?

  2. Tim Moore
    Code Wrangler
    Posted 1 year ago #

    Are you on a new server, by chance? If you are running Apache, is mod_rewrite enabled?

    Your .htaccess looks right. I'd just make sure mod_rewrite is running and that your AllowOverride directive in the Apache configuration is set to All.

  3. jmwebguy
    Member
    Posted 1 year ago #

    I have been running this for over a year now. The only new thing I did was the UPGRADE then the UPdate of the blogs, themes, etc. It's running on a Windows server, btu like I said, it has been over a year with zero issues.

  4. Tim Moore
    Code Wrangler
    Posted 1 year ago #

    Any chance the file permissions may have changed when you upgraded?

  5. jmwebguy
    Member
    Posted 1 year ago #

    You referring to the blogs.dir directory? I checked and it has full access. As mentioned, uploading works fine--it's the viewing After I upload, and for any images prior to upgrade.

  6. Your .htaccess is wrong. The one from WPMU has been optimized to run better. Try this:

    # BEGIN WordPress
    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).*) $1 [L]
    RewriteRule  ^[_0-9a-zA-Z-]+/(.*\.php)$ $1 [L]
    RewriteRule . index.php [L]
    # END WordPress
    
    <IfModule mod_security.c>
    <Files async-upload.php>
    SecFilterEngine Off
    SecFilterScanPOST Off
    </Files>
    </IfModule>
  7. jmwebguy
    Member
    Posted 1 year ago #

    That didn't work either.
    Let me throw another wrench in.

    Started with FRESH install of mysql db and WP 3.0.1. Followed steps for making it "network-ready". Created new blog. Created new post on that new blog and added an image. Went to view the post and image DOES NOT show.
    http://blogtest.cordillerablogs.com/joey/2010/11/12/test-images/

  8. Okay, the image SHOULD show up here:

    http://blogtest.cordillerablogs.com/joey/files/2010/11/hanna.jpg

    Which should translate to
    http://blogtest.cordillerablogs.com/wp-content/blogs.dir/2/files/2010/11/hanna.jpg

    But that doesn't work either...

    Wait. Are you using SubDIRECTORIES or SubDOMAINS?

    This URL http://cordillerablogs.com/jmwebguy/ implies subfolders, but this one http://blogtest.cordillerablogs.com/joey implies that you're using SubDomains with it's own subfolder install...

  9. jmwebguy
    Member
    Posted 1 year ago #

    SUbfolders with both install. I just did the new install with a different a-record.

  10. Okay. Makes more sense now :)

    What blog number is the http://blogtest.cordillerablogs.com/joey one?

    Are the files there in the /wp-content/blogs.dir/#/files/2010/11/ folder?

    It sounds like your .htaccess isn't being processed right.

  11. jmwebguy
    Member
    Posted 1 year ago #

    I think you're right on target saying the .htaccess isn't being processed right, but why would that have changed when the upgrade and the new install?

    To answer your question, the joey blog is #2 and the file DOES exist in the files/date folder.

  12. If the blog is #2 then this, which DOES NOT use Redirects, should work:

    http://blogtest.cordillerablogs.com/wp-content/blogs.dir/2/files/2010/11/hanna.jpg

    Do you have hotlink protection on your server? Or did the server upgrade something? A new version of CentOS just came out this week and buggered up my sites a bit.

  13. jmwebguy
    Member
    Posted 1 year ago #

    WOOHOO!!! I got this fixed. For some reason my ISAPI re-write utility was taking over and it had bad information based on the older version. Once I updated this, it worked. Thanks so much for the help!!

Topic Closed

This topic has been closed to new replies.

About this Topic