• Hi everyone,

    A few weeks ago I created a network running WordPress MultiSite, including in it all of my blogs which were in a single WordPress install before.

    I think I am posting the same question as many people, but I do it because I cannot find what I need: how to redirect the URLs of the uploads? In my case, I need to redirect them from the previous structure
    wp-content/uploads/YYYY/mm
    to the new one
    wp-content/uploads/sites/sitenumber/YYYY/mm
    in order to keep the URLs in external environments correct (eg Pinterest pinned pictures, URLs indexed by Google that I can see in Webmaster Tools, etc.).

    I guess there is a simple way to do it via .htaccess file, but I am not familiar with rewrite rules, so I am lost.

    Thanks for the help

    Manu

Viewing 1 replies (of 1 total)
  • Thread Starter manu-oswald

    (@manu-oswald)

    Hi, I’ve built a RewriteRule supposed to work, but unfortunately it doesn’t.

    RewriteCond %{HTTP_HOST} ^blog.brand.com [NC]
    RewriteRule ^uploads/2015/(.*)$ https://blog.brand.com/wp-content/uploads/sites/sitenumber/2015/$1 [R=301,NC,L]

    I use the condition in order to separate rewrite rules for each site, since the site number is not a fixed value.

    What am I missing?

Viewing 1 replies (of 1 total)
  • The topic ‘Redirect the uploads URLs’ is closed to new replies.