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

    (@ipstenu)

    ?????? Advisor and Activist

    Subfolders should still be accessible. If you manually make a subfolder called gpx, then it will be available at *.yourdomain.com/gpx (where * is whatever your subdomain is).

    I use that functionality in some weird stuff ??

    I would not upload it to the media library unless I had to, as those are per-site and (as of today) cannot talk to each other.

    Thread Starter colegota

    (@colegota)

    Subfolders should still be accessible. If you manually make a subfolder called gpx, then it will be available at *.yourdomain.com/gpx (where * is whatever your subdomain is).

    Thanks Ipstenu, you are right! But this is messy. ??

    I did worked at my test site pedrezuela.net and created a gpx folder so I put the file at public_html/gpx/egon-400.gpx Then it’s true its accessible via https://colegota.pedrezuela.net/gpx/egon-400.gpx and https://pedrezuela.net/gpx/egon-400.gpx also. But if I pass the subdomain URL to the plugin, then it works at subdomain post but not at main page replicated post, and if I pass the domain URL to the plugin it works in main page but not at subdomain.

    I supposed then it’s related to plugin. I’ll try to contact again with his developer.

    Examples at:
    .- Original post at subdomain: https://colegota.pedrezuela.net/2011/01/19/prueba-marcadores/
    .- Category page at main replicated blog: https://pedrezuela.net/seccion/campamento-base/

    This is the code passed to the plugin
    [osm_map lat="-8.642" long="122.424" zoom="12" width="600" height="450" type="CycleMap" gpx_file="https://colegota.pedrezuela.net/gpx/egon-400.gpx"]

    When it works (now at subdomain) you’ll see a blue line on map with the GPS trace.

    Regards,
    Colegota
    PD I forget to say that there is a previous similar question one month ago. But then I’ve using RSS syndication and now I’ve changed to wordpress-mu-sitewide-tags.

    Thread Starter colegota

    (@colegota)

    Found a little hack by now.

    As Ipstenu said, domain directories are visible to subdomains, and after my previous test seems that visibility depends on where you are at the moment of the reference. So if you are watching post from main domain you need url belongs to main domain and if you are reading posts from subdomain, url must contain subdomain.

    Then a solution it’s to edit main domain post just after created the subdomain one. Then remove the subdomain reference at url.

    If you need to use the file sample.gpx, you upolad it to public_html/gpx/sample.gpx, and use it as https://subdomain.domain.com/gpx/sample.gpx at subdomain post (the original one).

    Then access main domain admin->posts and edit the replicated one removing “subdomain.” from url having https://domain.com/gpx/sample.gpx and then it works both in domain and subdomain pages.

    The only drawback it’s that every time you updated posts at subdomain you need to fix url again at main domain. But that’s not so usual.

    Well, it’s not perfect but can be useful while we found a better solution.

    You can test it at my site. You must see blue lines (tracks) at the maps at posts, both at domain and subdomain:

    https://mapamundi.info/tema/plugin-osm/
    https://colegota.mapamundi.info/tema/plugin-osm/

    Regards,
    Colegota

Viewing 3 replies - 1 through 3 (of 3 total)
  • The topic ‘Share files/media between subdomain and main site’ is closed to new replies.