The MU forums have moved to WordPress.org

Image Upload paths incorrect (16 posts)

  1. mybenson
    Member
    Posted 14 years ago #

    I've been scouring the forums for a solution to this problem for the last 4 hours. Everyone seems to have this problem in one form or another, but I can't seem to get it fixed.

    Basically, when creating a new post, I go to upload an image. The file URL is like this: http://sparklogix.com/files/2010/01/Dock.jpg

    But it is being uploaded to this URL:
    http://sparklogix.com/wp-content/blogs.dir/1/files/2010/01/Dock.jpg

    Obviously, this is causing the image to not show. I've changed this info in the Site Admin panel:

    UPLOAD PATH: wp-content/blogs.dir/1/files/

    UPLOAD URL PATH: wp-content/blogs.dir/1/files/

    FILEUPLOAD URL: wp-content/blogs.dir/

    Not sure what (if anything) needs to be changed in the htaccess file. I still don't get the numbers for permissions, but this is what my permissions are set at for the wp-content folder:

    Web User: Read, Write, Execute
    Owner: Read, Write, Execute

    What else should I be doing (or not doing)? Thanks!

  2. SteveAtty
    Member
    Posted 14 years ago #

    No - that is correct. The .htaccess file contains the re-write rule to change the url from the first one you pasted to the second which is where the file really lives on the server.

  3. andrea_r
    Moderator
    Posted 14 years ago #

    Yep, what Steve said. That's how mu stores images and handles rewriting the urls.

    So, if it's not working, it means the server is not finding them.

    Since the pic is actually there on the server & we can see it too, that means the url is not being rewritten.

    Check the htaccess - is it almost exaclty like htacess.dist?

    (please don't paste it here, we all know what it's supposed to look like :) )

  4. mybenson
    Member
    Posted 14 years ago #

    I know you said not to post it, but I'm not sure what it's supposed to look like, so I don't know how to answer your question.. I don't know what is in the htaccess.dist file because I don't have one. This is the rewrite part in the htaccess file. Should I be changing the "RewriteRule" part of it? And if so, to what?

    Thanks :)

    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteRule . /index.php [L]

  5. SteveAtty
    Member
    Posted 14 years ago #

    You shouldn't need to change it - it should have been created on install

    You should have (amongst other things):

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^(.*/)?files/(.*) wp-content/blogs.php?file=$2 [L]
  6. mybenson
    Member
    Posted 14 years ago #

    Do I add this to the file in addition to what is already there, or as a replacement? I have had other issues with the htaccess file, with advice from other sites. I changed it once and it screwed everything up, which is why it may not be what it should. I appreciate the help.

  7. andrea_r
    Moderator
    Posted 14 years ago #

    The htaccess.dist file is included in the download. That;s what mu uses to build the .htaccess file with.

    http://trac.mu.wordpress.org/browser/trunk/htaccess.dist

  8. mybenson
    Member
    Posted 14 years ago #

    I created the htaccess.dist file with the info based on that link you gave me. I think what happened was that I thought I was supposed to rename the htaccess.dist file to .htaccess which deleted that file. the htaccess.dist now has the info in it that SteveAtty gave, but the uploads still aren't working. Am I supposed to have both of those files in the root?

  9. SteveAtty
    Member
    Posted 14 years ago #

    You need to have a .htaccess file which will be based on the .htaccess.dist file, and as Andrea said - it should be almost identical, but wont be - the rewrite base will be different

  10. mybenson
    Member
    Posted 14 years ago #

    Okay, well, now I have both (.htaccess and htaccess.dist) in the root.

    The rewrite rules Steve posted are in both files.

    The only difference I can see is .htaccess has this:

    RewriteEngine On
    RewriteBase /

    and htaccess.dist has this:

    RewriteEngine On
    RewriteBase BASE/

    Photos still aren't showing. I really know nothing about this htaccess stuff. It's like listening to an alien language. I'm trying, but apparently I'm not catching on too fast. What am I doing wrong?

  11. SteveAtty
    Member
    Posted 14 years ago #

    mod_rewrite is enabled isn't it?

  12. mybenson
    Member
    Posted 14 years ago #

    Not sure how to enable it, but what I can find on GoDaddy is that it is automatically enabled on Linux servers, which I'm on.

  13. SteveAtty
    Member
    Posted 14 years ago #

    Ah.. GoDaddy.....

  14. mybenson
    Member
    Posted 14 years ago #

    I know, I know...

  15. andrea_r
    Moderator
    Posted 14 years ago #

    Oh God... not even sure where to start... ;D

    I know MU works on godaddy if you have the right stuff & get it installed.

    "The only difference I can see is .htaccess has this:

    RewriteEngine On
    RewriteBase /

    and htaccess.dist has this:

    RewriteEngine On
    RewriteBase BASE/

    "

    Yep, that;s good & expected. So we know it's not the htaccess then.

    What we're down to know is just coming over every single thing on the server to find out. Permissions, folder ownerships, all kinds of fiddly things.

  16. bigbluestingray
    Member
    Posted 14 years ago #

    mybenson, hi!

    Having a same problem with GoDaddy account (still free ride). Was your problem solved? I'll be appreciated to know solution.

    TIA,

About this Topic

  • Started 14 years ago by mybenson
  • Latest reply from bigbluestingray