• Resolved jmwebguy

    (@jmwebguy)


    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:
    https://cordillerablogs.com/jmwebguy/2010/11/12/testing-images/

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

    The image IS located in this folder: blogs.dir/2/files/2010/11/sports-300×185.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?

Viewing 12 replies - 1 through 12 (of 12 total)
  • Tim Moore

    (@tmoorewp)

    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.

    Thread Starter jmwebguy

    (@jmwebguy)

    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.

    Tim Moore

    (@tmoorewp)

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

    Thread Starter jmwebguy

    (@jmwebguy)

    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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    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>
    Thread Starter jmwebguy

    (@jmwebguy)

    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.
    https://blogtest.cordillerablogs.com/joey/2010/11/12/test-images/

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Okay, the image SHOULD show up here:

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

    Which should translate to
    https://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 https://cordillerablogs.com/jmwebguy/ implies subfolders, but this one https://blogtest.cordillerablogs.com/joey implies that you’re using SubDomains with it’s own subfolder install…

    Thread Starter jmwebguy

    (@jmwebguy)

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

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Okay. Makes more sense now ??

    What blog number is the https://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.

    Thread Starter jmwebguy

    (@jmwebguy)

    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.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

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

    https://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.

    Thread Starter jmwebguy

    (@jmwebguy)

    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!!

Viewing 12 replies - 1 through 12 (of 12 total)
  • The topic ‘Still no images appearing after trying everything’ is closed to new replies.