redirect rule wp-content/uploads to files for multisite
-
hello again,
i have successfully switched around 15 single wordpress blogs into one big multisite installation. everything went rather well, but now i noticed that the path for media changed from “wp-content/uploads/xxx” to “files/xxx”.
this is not a problem as far as hardcoded references in post contents are concerned, i already updated this with a simple replace, the problem is deep links from other websites and search engines.
if someone has a deep link to domain1.com/wp-content/uploads/2011/05/test.pdf i want this to be redirected to domain1.com/files/2011/05/test.pdf!
i already found this post that said to use this:
RedirectMatch 301 /wp-content/uploads/(.*)$ https://www.mysite.org/files/$1
unfortunately, my problem is, that i have 15 different domains to be redirected to. if i use the “main”-blog url then the wordpress redirect still adds the site-id to the blog.dir folder:
/wp-content/blogs.dir/1/files/2011/09/
so this does not work with all the different sites.
any help, what should I do to have a redirect that is working with all hostnames and site-ids?
thanks, bye,
kwentin
- The topic ‘redirect rule wp-content/uploads to files for multisite’ is closed to new replies.