Blocking access to uploads in Multisite

Hi,

I’m running a site on a Multisite installation that is restricted to logged-in users. However if people have the direct url to a media file they can access it via the uploads directory for that site.

I don’t have any membership plugins installed, just the Force User Login plugin.

All the solutions I’ve seen for this involve edit ing the .htaccess file which won’t work for me as I need public access to uploads in other sites on the network.

Do you know of a solution to this that doesn’t involve editing the settings for each media file as I upload it, but can let me restrict access to everything in the uploads folder for that site?

Thanks,

Rachel

  • Adam Czajczyk
    • Support Gorilla

    Hello Rachel McCollin,

    I hope you’re well today and thank you for your question!

    The “.htaccess” solution is surely most “foolproof” but will indeed limit download to current site (or some specifically enlisted sites). The solution here would be our Membership 2 Pro plugin with “Media Protection” add-on enabled.

    This would let hide/cloak real download URL’s and even limit download access to the members of selected memberships only. This will work with files located inside WP Media Library but it’s not a “hotlinking” prevention tool so you should be able to add download links to your other sites.

    That said, you could use Membership 2 Pro plugin as “network activated” therefore covering your entire network with a single plugin and a few click. I think you may want to take a look at Membership 2 Pro usage guide to get a better view:

    https://premium.wpmudev.org/project/membership/

    I hope that helps!

    Best regards,

    Adam

Thank NAME, for their help.

Let NAME know exactly why they deserved these points.

Gift a custom amount of points.