I just did .htaccess for wp3.0 ms.
I also moved the existing media from their respective old blogs individual folders to
wp-content/blogs.dir/<blog id>/files/uploads
and set up the .htaccess so that the existing image urls from pre 3.0 MS resolve to their new locations (at least for the primary blog).
I’m using wildcards and subdomains and AFAIK all that is resolving correctly with DNS and virtual hosts with wildcard etc.
I found this link:
https://www.ads-software.com/support/topic/386527?replies=13
that told me to add this line
RedirectMatch 301 /wp-content/uploads/(.*)$ https://www.mysite.org/files/$1
to .htaccess
Now I have three compllicated QUESTIONS so bear with me:
#1
Given that the remainder of my .htaccess is what’s recommended for wp3.0 ms I can see that the 301 Redirect redirects EVERYTHING with wp-content/uploads in the url to the main URL for all blogs.
Then this rule:
RewriteRule ^(.*/)?files/(.*) wp-includes/ms-files.php?file=$2 [L]
kicks in and it rewrites yet again to dynamic code to resolve the file to the appropriate place. But it seems to me if the domain of the second request is always the main domain no matter what domain you’re serving media for, it will have no way to know which blog id folder to look in, and that’s borne out because images with old URL’s only render correctly on the “main” blog.
Question #2
I see a lot of upload URL and path fields in my uberadmin config for these blogs. Some clearly pertain to plugins (many of which aren’t even active!!) and I noticed when I uploaded new media it sets the URL to exactly where the file lives. I.E. none of those rewrite rules would be necessary. I have it configured to do that I guess, because I set all uploads URLS and paths to somethig with blogs.dir/<blog id>/files in it. It seems like going through all those rewrites introduces overhead so maybe that’s what one wants. But I haven’t seen documentation for exactly what those upload urls and paths control, for example is one for generating blog post URLS from uploads or what? What is considered best practice for the log run?
Question #3
Finally, it seems to me like someone might write a script to sequence through all the blog posts at database level and replace all media URLS that are currently working through complicated rewrites and redirects with straight URLS that resolve properly the first time? I have the skills necessary to write such a script if anyone thinks that would be a good thing to do.
Actually one more What the *** is a “mature” blog? Does that mean it’s no longer being updated??
Thank you!!!