• I have just discovered that media uploaded to one subsite is available using the URL of any other subsite.

    For example both of these URLs will open the file uploaded to site 28:

    • site28.xyz.com/wp-content/uploads/sites/28/2020/11/file.jpg
    • site15.xyz.com/wp-content/uploads/sites/28/2020/11/file.jpg

    Is this an expected behaviour? Can it be changed?

Viewing 1 replies (of 1 total)
  • Moderator bcworkz

    (@bcworkz)

    Multisite subdomain requests all end up at the same server location. From there the path to a file is the same regardless of subdomain. WP is not even involved in media file requests, so any measures need to be at the server level. You could probably have some .htaccess rules that for example only allow the path /sites/28/ be accessed if the referrer subdomain is site28.

    But why is such access from other sites a problem? Unless special measures like I mentioned are taken, I could even embed an image from your site on my own site on a completely different server. It’s how the Internet works.

Viewing 1 replies (of 1 total)
  • The topic ‘Uploads available from all subsites’ is closed to new replies.