• AJ Troxell

    (@phiredesign)


    Using download monitor on all three of my sites. On the main site, the parent site, the root domain for multisite, downloads work find out of the box, and of course to get downloads to work for the child sites, i have to enter this into download.php

    //for multisite	installations
      if ( is_multisite() ) {
       $path = '/wp-content/blogs.dir/' . $blog_id . '/' . $path;
     }

    But what this does is break downloads on the parent/root site and allows them to work on the child sites. Is there any way for both to work that anyone has found?

    http://wordpress.org/extend/plugins/download-monitor/

Viewing 4 replies - 1 through 4 (of 4 total)
  • checking if this is the root or child site solves the problem:

    if(is_multisite() && 1 != $blog_id ){
    
    	$path = 'wp-content/blogs.dir/' . $blog_id . '/' . $path;
    
    }

    If you use a Custom Download URL (for example: yoursite.com/download/ID), make sure you add the following to your .htaccess under the download plugin section:

    RewriteRule ^([_0-9a-zA-Z-]+/)?download/([^/]+)$ /wp-content/plugins/download-monitor/download.php?id=$2 [L]

    NOTE: assuming you use the subfolder setup for the multisite!

    Hope this helps

    But what if I’m using the subdomain instalation?

    Thread Starter AJ Troxell

    (@phiredesign)

    Using the subdomain setup has always been hit or miss on my end. I personally would suggest the subfolder setup and using a domain mapping plugin to change it to a subdomain or primary domain. Its not perfect but it works.

    I can confirm that @wrk’s fix works when using this plugin on a multi-site install that uses separate domains. I’ve posted it to github in hoping that it might get patched in.

Viewing 4 replies - 1 through 4 (of 4 total)
  • The topic ‘[Plugin: WordPress Download Monitor] Multisite works on main domain but not on child domains’ is closed to new replies.