Viewing 15 replies - 16 through 30 (of 42 total)
  • I am aware of the correction to the .htaccess from ipstenu above. Does it apply in my case as well or do I need to edit it further? Is so, what do I use?

    Does your .htaccess look like the one Ipstenu posted?

    Edit: oh wait, is this the actual url it spits out? Or did you mistype it?

    https://mywebsite.org/files/2010/09/grand-prix-large-300×185.jpg/grand-prix-large-300×185.jpg

    with the duplicate image filename?

    I think this is the relevant part:

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    Yep, you;ve got a whole group in there. Did you upgrade from wordpressmu?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    oddclicker — I meant hotlink protection. Hotline protection is what I need when I get phone calls at work…

    Also, are you using a domain mapping plugin or are these separate MU installs?

    This was an MU install from about a year ago. I recently got some renewed interest in it and upgraded it to 3.0.1

    I am not using a domain mapping plugin. Not sure how to answer the question about separate MU installs. I have just one with two sites.

    Oops! I cross-stitched the threads. Disregard my second paragraph. Sorry.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Okay, so this is an MU install and you ARE using a domain mapping plugin? Which one?

    I think this is the relevant part:

    #uploaded files
    RewriteRule ^(.*/)?files/$ index.php [L]
    RewriteCond %{REQUEST_URI} !.*wp-content/plugins.*
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    In another thread, another upgraded from mu user removed the first two lines in this group and it worked fine for him.

    OK, I made the changes so it looks like this:

    #uploaded files
    RewriteRule ^([_0-9a-zA-Z-]+/)?files/(.+) wp-includes/ms-files.php?file=$2 [L]

    But, images are still not getting the right address.

    What about this section of .htaccess?

    # 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]

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    RickA99 – Are you using Subdomains or subfolders? The htaccess files are different. ??

    subdomains

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    Righto, try this htaccess file:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # uploaded files
    RewriteRule ^files/(.+) wp-includes/ms-files.php?file=$1 [L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule . index.php [L]
    # END WordPress

    Make sure you’ve pulled out everything else from your old wpmu htaccess. If you have other edits to the .htaccess file, you should temporarily take them out. Let’s just use the default for a moment ??

    (FYI – I am a HUGE proponent of leaving in comments in your .htaccess file so you can later go ‘Oh right, I added that to fix this…’)

    The apparent image location looks like this:
    https://[path]/files/2010/09/grand-prix-large-300×185.jpg

    But the actual storage location is this:
    https://[path]/wp-content/blogs.dir/2/files/2010/09/grand-prix-large-300×185.jpg

    And everything is now connecting up! Thanks so much.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    That is correct and perfect behavior ??

Viewing 15 replies - 16 through 30 (of 42 total)
  • The topic ‘Images are not uploading into correct file’ is closed to new replies.