• Resolved Shane Gowland

    (@thewebatom)


    I’ve just started to migrate an older multisite network to fresh install. I’ve installed it using the “subdirectory” option, then used the Domain Mapping plugin to map another domain to a subsite.

    Currently, I have:
    main-site.com
    secondary-site.com (a domain mapped to main-site.com/secondary/)

    Permalinks on the secondary site are working fine, but URL rewriting isn’t working for media uploads. All uploads are accessible only via the main site.

    mainsite.com/secondary/wp-content/uploads/sites/2/2013/07/image.jpg

    Here’s the .htaccess rules I’m using:

    # BEGIN WordPress
    RewriteEngine On
    RewriteBase /
    RewriteRule ^index\.php$ - [L]
    
    # add a trailing slash to /wp-admin
    RewriteRule ^([_0-9a-zA-Z-]+/)?wp-admin$ $1wp-admin/ [R=301,L]
    
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(wp-(content|admin|includes).*) $2 [L]
    RewriteRule ^([_0-9a-zA-Z-]+/)?(.*\.php)$ $2 [L]
    RewriteRule . index.php [L]
    # END WordPress

    Any ideas as to why uploads aren’t being routed through ‘secondary-site.com/files/*/*/image.jpg’?

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

    (@ipstenu)

    ?????? Advisor and Activist

    All uploads are accessible only via the main site.

    All NEW uploads? Or all existing ones?

    secondarysite.com/wp-content/uploads/sites/2/2013/07/image.jpg isn’t working at all?

    Thread Starter Shane Gowland

    (@thewebatom)

    New and old.

    Moderator Ipstenu (Mika Epstein)

    (@ipstenu)

    ?????? Advisor and Activist

    And secondarysite.com/wp-content/uploads/sites/2/2013/07/image.jpg isn’t working at all?

    Thread Starter Shane Gowland

    (@thewebatom)

    It was throwing a 500 error, but never mind; I just got it working,

    The “homeurl” field in the site settings hadn’t been changed to the new domain. (Oddly, “siteurl” had). A quick trip into phpmyadmin and it’s all working as expected.

    Thanks for getting back to me, nonetheless.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘Multisite media mapping issue’ is closed to new replies.