Viewing 7 replies - 1 through 7 (of 7 total)
  • Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Yeah, that’s expected. In WP 3.5 and up, images are in /uploads/sites/ and not /blogs.dir/

    Don’t try to make the urls /files/, do a search/replace and change it to sites/2 instead.

    Thread Starter zebrastribe

    (@zebrastribe)

    Hi Mika

    Thank you for your reply. I understand that the new way of placing the files is in the “uploads”-folder and I have no problem with the files being there but I would really like to have the url for the visitor as clean as possible and not include the wp-content/uploads/sites/ or /blogs.dir/

    Like
    http://domain.com/media/2008/06/image.jpg

    Can I be done?

    If I understand you correctly you are talking about updating the database from “/files/” to “sites/2”, right?

    Then the url will look like:
    http://domain.com/wp-content/uploads/sites/2/2014/02/image.jpg

    Can the “wp-content/uploads/sites/” part be just f.ex “media”?
    As I have seen the in roots.oi theme?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    Can? Yes. But you’re into custom design land. You would have to reverse engineer the ms-files.php calls from older WPs to do this, and frankly, you’re on your own.

    The reason the /files/ call was dropped was that it doesn’t work on all servers, it’s slower, and it causes loopback issues. We don’t support or recommend a NEW install use it.

    Thread Starter zebrastribe

    (@zebrastribe)

    Hi Mika

    Ok. The custom land is not the way for me…

    Why does the old install exclude the “wp-content/blogs.dir/2/” from visitors url?
    when the new install does not hide the “wp-content/uploads/sites/2/?

    I guess I hoped that there were some magic htaccess rewrite rule that could make it work…

    Instead of having to relay on this plugin:

    http://codecanyon.net/item/hide-my-wp-no-one-can-know-you-use-wordpress/4177158

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    http://codex.wordpress.org/Multisite_Network_Administration#Uploaded_File_Path

    ms-files.php used to parse the URL by using the complex .htaccess redirect. So it went htaccess -> ms-files.php -> image. And that’s a probelm on a lot of servers :/

    But … Nobody cares if you’re using WP. I mean, realistically, you can hide it all you want, and I can STILL find out in about a minute, while drinking a beer. Brute Force attacks don’t care. They’ll still hammer you. Targeted attacks because you ticked someone off won’t change either. It’s a waste of my time and my server’s CPU to bother.

    Thread Starter zebrastribe

    (@zebrastribe)

    ok. I see you point and thank you for explanation, sorry for my ignorance…

    Which is the best procedure for updating the links inside the post?

    Because now the new images are placed into “wp-content/uploads/sites/2/” and the old are with the “/files/” (which is in the “wp-content/uploads/sites/2/” folder)

    At the moment the old is on domain.com and the new is on sub.domain.com but when all is up and running I will make the switch.

    You talk about search/replace?

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    🏳️‍🌈 Advisor and Activist

    I recommend this: https://github.com/interconnectit/Search-Replace-DB

    it’s not WordPress, it’s a separate script, but it’s absolutely the best thing.

    In your case, you’ll search for the WHOLE PATH for the images.

    However if you’re concerned about accidently getting other tables, then you want to ONLY search the wp_2_posts table.

Viewing 7 replies - 1 through 7 (of 7 total)
  • The topic ‘Media url’ is closed to new replies.